[Bug d/89735] FAIL: gdc.dg/runnable.d -O0 execution test
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89735 Iain Buclaw changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #10 from Iain Buclaw --- Tests that were problematic on bigendian were fixed in r270523. I can't see any more reported issues, so marking resolved.
[Bug d/89735] FAIL: gdc.dg/runnable.d -O0 execution test
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89735 --- Comment #9 from dave.anglin at bell dot net --- On 2019-03-16 1:51 p.m., ibuclaw at gdcproject dot org wrote: > All modules would need rebuilding, so clean and rebuild the target libphobos > library too. After library rebuild, there are no more unaligned accesses.
[Bug d/89735] FAIL: gdc.dg/runnable.d -O0 execution test
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89735 --- Comment #8 from Iain Buclaw --- (In reply to dave.anglin from comment #7) > On 2019-03-16 1:10 p.m., ibuclaw at gdcproject dot org wrote: > > Still all related to the same ModuleInfo generated by gdc compiler. > I just did "make" after applying patch. Then, I rebuilt application. Could > it be > that full rebuild is needed? > > Otherwise, maybe TYPE_ALIGN_UNIT (type) still yields 1. > All modules would need rebuilding, so clean and rebuild the target libphobos library too.
[Bug d/89735] FAIL: gdc.dg/runnable.d -O0 execution test
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89735 --- Comment #7 from dave.anglin at bell dot net --- On 2019-03-16 1:10 p.m., ibuclaw at gdcproject dot org wrote: > Still all related to the same ModuleInfo generated by gdc compiler. I just did "make" after applying patch. Then, I rebuilt application. Could it be that full rebuild is needed? Otherwise, maybe TYPE_ALIGN_UNIT (type) still yields 1. Dave
[Bug d/89735] FAIL: gdc.dg/runnable.d -O0 execution test
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89735 --- Comment #6 from Iain Buclaw --- (In reply to John David Anglin from comment #5) > There's also an unaligned accesses here: > > (gdb) bt > #0 rt.minfo.ModuleGroup.sortCtors(immutable(char)[]) (this=..., > cycleHandling=...) at > ../../../../gcc/libphobos/libdruntime/rt/minfo.d:259 [... snip ...] > > and a few more. Still all related to the same ModuleInfo generated by gdc compiler.
[Bug d/89735] FAIL: gdc.dg/runnable.d -O0 execution test
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89735 --- Comment #5 from John David Anglin --- There's also an unaligned accesses here: (gdb) bt #0 rt.minfo.ModuleGroup.sortCtors(immutable(char)[]) (this=..., cycleHandling=...) at ../../../../gcc/libphobos/libdruntime/rt/minfo.d:259 #1 0x00111f70 in rt.minfo.ModuleGroup.sortCtors() (this=...) at ../../../../gcc/libphobos/libdruntime/rt/minfo.d:533 #2 __foreachbody1 (this=, sg=...) at ../../../../gcc/libphobos/libdruntime/rt/minfo.d:795 #3 0x001164ac in rt.sections_elf_shared.DSO.opApply(scope int(ref rt.sections_elf_shared.DSO) delegate) (dg=...) at ../../../../gcc/libphobos/libdruntime/rt/sections_elf_shared.d:61 #4 0x00110f04 in rt_moduleCtor () at ../../../../gcc/libphobos/libdruntime/rt/minfo.d:793 #5 0x0010931c in rt_init () at ../../../../gcc/libphobos/libdruntime/rt/dmain2.d:189 #6 0x00109544 in runAll (this=0xf8d02778) at ../../../../gcc/libphobos/libdruntime/rt/dmain2.d:484 #7 0x00108ea4 in tryExec (this=0xf8d02778, dg=...) at ../../../../gcc/libphobos/libdruntime/rt/dmain2.d:460 #8 0x0010912c in _d_run_main (argc=2308240, argv=, mainFunc=) at ../../../../gcc/libphobos/libdruntime/rt/dmain2.d:493 (gdb) disass $pc-16,$pc+16 Dump of assembler code from 0x11167c to 0x11169c: 0x0011167c <_D2rt5minfo11ModuleGroup9sortCtorsMFAyaZv+1692>: copy r4,r19 0x00111680 <_D2rt5minfo11ModuleGroup9sortCtorsMFAyaZv+1696>: ldw 4(r17),ret1 0x00111684 <_D2rt5minfo11ModuleGroup9sortCtorsMFAyaZv+1700>: ldi 0,ret0 0x00111688 <_D2rt5minfo11ModuleGroup9sortCtorsMFAyaZv+1704>: ldi 0,r18 => 0x0011168c <_D2rt5minfo11ModuleGroup9sortCtorsMFAyaZv+1708>: ldw,s ret0(ret1),r20 0x00111690 <_D2rt5minfo11ModuleGroup9sortCtorsMFAyaZv+1712>: cmpb,=,n r20,r8,0x1117a4 <_D2rt5minfo11ModuleGroup9sortCtorsMFAyaZv+1988> 0x00111694 <_D2rt5minfo11ModuleGroup9sortCtorsMFAyaZv+1716>: ldw 0(r3),rp 0x00111698 <_D2rt5minfo11ModuleGroup9sortCtorsMFAyaZv+1720>: ldw 4(r3),r31 End of assembler dump. (gdb) p/x $ret0 $5 = 0x0 (gdb) p/x $ret1 $6 = 0x21f471 and a few more.
[Bug d/89735] FAIL: gdc.dg/runnable.d -O0 execution test
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89735 --- Comment #4 from dave.anglin at bell dot net --- On 2019-03-15 9:02 p.m., ibuclaw at gdcproject dot org wrote: >> Might add that there are quite a few unaligned accesses: > I guess that forcing the ModuleInfo type alignment to 1 is not helping (see > patch). I think the patch helps but there is at least one more: Breakpoint 2, object.ModuleInfo.flags() const (this=...) at ../../../../gcc/libphobos/libdruntime/object.d:1523 1523 @property uint flags() nothrow pure @nogc { return _flags; } (gdb) p/x $r26 $7 = 0x1d080d (gdb) bt #0 object.ModuleInfo.flags() const (this=...) at ../../../../gcc/libphobos/libdruntime/object.d:1523 #1 object.ModuleInfo.importedModules() const (this=...) at ../../../../gcc/libphobos/libdruntime/object.d:1562 #2 0x0011166c in rt.minfo.ModuleGroup.sortCtors(immutable(char)[]) (this=..., cycleHandling=...) at ../../../../gcc/libphobos/libdruntime/rt/minfo.d:259 #3 0x00111f70 in rt.minfo.ModuleGroup.sortCtors() (this=...) at ../../../../gcc/libphobos/libdruntime/rt/minfo.d:533 #4 __foreachbody1 (this=, sg=...) at ../../../../gcc/libphobos/libdruntime/rt/minfo.d:795 #5 0x001164ac in rt.sections_elf_shared.DSO.opApply(scope int(ref rt.sections_elf_shared.DSO) delegate) (dg=...) at ../../../../gcc/libphobos/libdruntime/rt/sections_elf_shared.d:61 #6 0x00110f04 in rt_moduleCtor () at ../../../../gcc/libphobos/libdruntime/rt/minfo.d:793 #7 0x0010931c in rt_init () at ../../../../gcc/libphobos/libdruntime/rt/dmain2.d:189 #8 0x00109544 in runAll (this=0xf8d02778) at ../../../../gcc/libphobos/libdruntime/rt/dmain2.d:484 #9 0x00108ea4 in tryExec (this=0xf8d02778, dg=...) at ../../../../gcc/libphobos/libdruntime/rt/dmain2.d:460 #10 0x0010912c in _d_run_main (argc=2307488, argv=, mainFunc=) --Type for more, q to quit, c to continue without paging-- at ../../../../gcc/libphobos/libdruntime/rt/dmain2.d:493 (gdb) disass $pc-16,$pc+16 Dump of assembler code from 0x100344 to 0x100364: 0x00100344 <_D6object10ModuleInfo8unitTestMxFNaNbNdNiZPFZv+136>: ldw 0(ret0),ret0 0x00100348 <_D6object10ModuleInfo8unitTestMxFNaNbNdNiZPFZv+140>: bv,n r0(rp) 0x0010034c <_D6object10ModuleInfo15importedModulesMxFNaNbNdNiZAyPS6object10ModuleInfo+0>: ldo 40(sp),sp 0x00100350 <_D6object10ModuleInfo15importedModulesMxFNaNbNdNiZAyPS6object10ModuleInfo+4>: stw r19,-20(sp) => 0x00100354 <_D6object10ModuleInfo15importedModulesMxFNaNbNdNiZAyPS6object10ModuleInfo+8>: ldw 0(r26),ret0 0x00100358 <_D6object10ModuleInfo15importedModulesMxFNaNbNdNiZAyPS6object10ModuleInfo+12>: bb,<,n ret0,15,0x100374 <_D6object10ModuleInfo15importedModulesMxFNaNbNdNiZAyPS6object10ModuleInfo+40> 0x0010035c <_D6object10ModuleInfo15importedModulesMxFNaNbNdNiZAyPS6object10ModuleInfo+16>: stw r0,-38(sp) 0x00100360 <_D6object10ModuleInfo15importedModulesMxFNaNbNdNiZAyPS6object10ModuleInfo+20>: ldw -38(sp),ret0 End of assembler dump. runnable.exe(7936): unaligned access to 0x001d080d at ip=0x00100357 Some but not all calls to "object.ModuleInfo.flags() const (this=...)" have an unaligned value in %r26.
[Bug d/89735] FAIL: gdc.dg/runnable.d -O0 execution test
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89735 --- Comment #3 from Iain Buclaw --- Created attachment 45979 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45979=edit moduleinfo alignment (In reply to John David Anglin from comment #2) > Might add that there are quite a few unaligned accesses: I guess that forcing the ModuleInfo type alignment to 1 is not helping (see patch).
[Bug d/89735] FAIL: gdc.dg/runnable.d -O0 execution test
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89735 --- Comment #2 from John David Anglin --- Might add that there are quite a few unaligned accesses: runnable.exe(15999): unaligned access to 0x001d080d at ip=0x00100357 runnable.exe(15999): unaligned access to 0x0021f439 at ip=0x00100357 runnable.exe(15999): unaligned access to 0x0021f44d at ip=0x00100357 (gdb) disass 0x10035c-16,0x10035c+16 Dump of assembler code from 0x10034c to 0x10036c: 0x0010034c <_D6object10ModuleInfo15importedModulesMxFNaNbNdNiZAyPS6object10ModuleInfo+0>: ldo 40(sp),sp 0x00100350 <_D6object10ModuleInfo15importedModulesMxFNaNbNdNiZAyPS6object10ModuleInfo+4>: stw r19,-20(sp) 0x00100354 <_D6object10ModuleInfo15importedModulesMxFNaNbNdNiZAyPS6object10ModuleInfo+8>: ldw 0(r26),ret0 0x00100358 <_D6object10ModuleInfo15importedModulesMxFNaNbNdNiZAyPS6object10ModuleInfo+12>: bb,<,n ret0,15,0x100374 <_D6object10ModuleInfo15importedModulesMxFNaNbNdNiZAyPS6object10ModuleInfo+40> 0x0010035c <_D6object10ModuleInfo15importedModulesMxFNaNbNdNiZAyPS6object10ModuleInfo+16>: stw r0,-38(sp) 0x00100360 <_D6object10ModuleInfo15importedModulesMxFNaNbNdNiZAyPS6object10ModuleInfo+20>: ldw -38(sp),ret0 0x00100364 <_D6object10ModuleInfo15importedModulesMxFNaNbNdNiZAyPS6object10ModuleInfo+24>: stw r0,-34(sp) 0x00100368 <_D6object10ModuleInfo15importedModulesMxFNaNbNdNiZAyPS6object10ModuleInfo+28>: ldw -34(sp),ret1 (gdb) break *0x10035c Breakpoint 3 at 0x10035c: file ../../../../gcc/libphobos/libdruntime/object.d, line 1562. (gdb) list ../../../../gcc/libphobos/libdruntime/object.d:1562 1557return flags & MIunitTest ? *cast(typeof(return)*)addrOf(MIunitTest) : null; 1558} 1559 1560@property immutable(ModuleInfo*)[] importedModules() nothrow pure @nogc 1561{ 1562if (flags & MIimportedModules) 1563{ 1564auto p = cast(size_t*)addrOf(MIimportedModules); 1565return (cast(immutable(ModuleInfo*)*)(p + 1))[0 .. *p]; 1566}
[Bug d/89735] FAIL: gdc.dg/runnable.d -O0 execution test
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89735 --- Comment #1 from John David Anglin --- (gdb) p obj $3 = {{{fieldA = 0 '\000', fieldB = 0 '\000', fieldC = 0 '\000'}, _complete = 2}} (gdb) p $4 = (runnable.S186 *) 0xf8d0268c (gdb) x/x 0xf8d0268c 0xf8d0268c: 0x0002 Looks like endian issue.