Mercury Bugs - mercury
View Issue Details
0000474mercuryBugpublic2018-11-18 23:012018-11-18 23:23
Reporterpbone 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusnewResolutionopen 
Platformi386OSLinuxOS VersionDebian 9
Product Version 
Target VersionFixed in Version 
Summary0000474: Mercury cannot be installed, compiler crashes
DescriptionThe mercury compiler crashes when building the first libgrade:

root@oxygen:/tmp/mercury-rotd-20181114# cat install_grade_dir.asm_fast.gc.decldebug.stseg/library/mer_std.dep_err
Uncaught Mercury exception:
Software Error: map.lookup: key not found
        Key Type: libs.options.option
        Key Value: profile_time
        Value Type: getopt_io.option_data
Stack dump not available in this grade.

It crashes when invoked with no arguments.

root@oxygen:/tmp/mercury-rotd-20181114# ./compiler/mercury_compile
Uncaught Mercury exception:
Software Error: map.lookup: key not found
        Key Type: libs.options.option
        Key Value: profile_time
        Value Type: getopt_io.option_data
Stack dump not available in this grade.

I don't think this is a configuration problem because it works on amd64, this is just happening on i386 (32-bit). Maybe something to do with argument packing on 32bit systems when those arguments are used as map keys?
Steps To ReproduceI found this while building Mercury to make Debian packages. My scripts install a minimal system in /tmp/bootstrap and then clean the build directory and use the first version to build a more complete version, it seems that the second generation compiler is crashing.
TagsNo tags attached.
Attached Files

Notes
(0001021)
juliensf   
2018-11-18 23:23   
It's not likely to be argument packing since that's currently not enabled by default.

- What version of GCC are you using?
- Is the bootstrap compiler the hlc.gc.pregen one? If not, what grade is it compiled in?

(Also, there are issues with the asm_fast grades on x86 systems at the moment, see 0000453.)

Issue History
2018-11-18 23:01pboneNew Issue
2018-11-18 23:23juliensfNote Added: 0001021