2024-03-29 20:15 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000098mercuryBugpublic2014-01-28 15:55
Reporterjuliensf 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000098: compiler throws exception with --profile-for-implicit-parallelism
Descriptionrotd-2009-06-09 aborts with an exception when compiling the standard library module
erlang_rtti_implementation.m in grade asm_fast.gc.profdeep with --profile-for-implicit-parallelism
enabled.

Uncaught Mercury exception:
Software Error: llds_out.m: Unexpected: stack var out of range
Stack dump not available in this grade.

Compiling with --no-inline-simple acts a workaround.
TagsNo tags attached.
Attached Files

-Relationships
related to 0000309closedpbone Compiler crashes during LLDS to C "stack var out or range" 
+Relationships

-Notes

~0000172

pbone (administrator)

--profile-for-implicit-parallelism enables inlineing which is normally disabled in deep profiling builds. This makes the resulting profile look more like the profile that would be generated by a non-profiling build.

I believe that this bug might be able to be triggered by enabling inlineing in a deep profiling build without enabling --profile-for-implicit-parallelism.

~0000173

juliensf (administrator)

Yes, you're right. Compiling without --profile-for-implicit-paralellism but with --profile-optimized
enabled also triggers the bug.

~0000175

juliensf (administrator)

Last edited: 2009-06-15 01:36

I've uploaded a cut-down version of erlang_rtti_implemetation that exhibits this bug.
(Curiosly, the problem goes away if I rename the module, although I can't see anywhere
in the compiler that treats the module erlang_rtti_implementation specially in C grades;
the bug is also not present if we rename the module to another stdlib or builtin module.)

The test case is derived from r1.89 of library/erlang_rtti_implementation.m.

~0000609

zs (developer)

The compiler DOES treat standard library modules specially in some places. It does list them by name; it uses mercury_std_library_module/1 in library/library.m.

~0000622

pbone (administrator)

I cannot reproduce this bug (on a compiler without the 0000309 fix) using the attached file. Perhaps changes have been made to the compiler such that the bug (whatever it was) is no longer being triggered.

I also can't reproduce this by building Mercury with these options. Unless someone knows how to reproduce this, I propose we close this bug.

Thanks.
+Notes

-Issue History
Date Modified Username Field Change
2009-06-12 14:56 juliensf New Issue
2009-06-12 16:26 pbone Note Added: 0000172
2009-06-12 16:49 juliensf Note Added: 0000173
2009-06-15 01:32 juliensf File Added: erlang_rtti_implementation.m
2009-06-15 01:34 juliensf Note Added: 0000175
2009-06-15 01:36 juliensf Note Edited: 0000175
2014-01-21 09:42 pbone Relationship added related to 0000309
2014-01-22 15:26 zs Note Added: 0000609
2014-01-28 15:55 pbone Note Added: 0000622
+Issue History