Bug 18242 – DMD Segmentation fault.

Status
RESOLVED
Resolution
FIXED
Severity
blocker
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-01-16T02:50:01Z
Last change time
2018-03-23T04:30:12Z
Assigned to
No Owner
Creator
changlon

Comments

Comment #0 by changlon — 2018-01-16T02:50:01Z
I run into DMD segmentation fault under linux and Mac OSX, not test windows yet. DMD v2.078.0-401-g716303a41-dirty DEBUG Program received signal SIGSEGV, Segmentation fault. 0x00005555558c694e in _D3dmd12statementsem13catchSemanticFCQBj9statement5CatchPSQCe6dscope5ScopeZv (sc=0x7ffff5f611e0, c=0x7ffff7efb550) at dmd/statementsem.d:4038 4038 cd != ClassDeclaration.exception && !ClassDeclaration.exception.isBaseOf(cd, null) && The demangle symbol is: void dmd.statementsem.catchSemantic(dmd.statement.Catch, dmd.dscope.Scope*) The code is rather big and I can not made it work with dustmite.
Comment #1 by changlon — 2018-01-16T03:08:18Z
/** * This code is based on Adam D. Ruppe $(LINK2 http://arsdnet.net/dcode/minimal.zip minimal.zip). * Probably Boost licensed */ module object; /// All D class objects inherit from Object. class Object { } /// The base class of all thrown objects. class Throwable { } int _d_run_main() { int result = void; try result = 1; catch(Throwable e) _d_print_throwable; } ============== dmd -defaultlib= -debuglib= object.d
Comment #2 by bugzilla — 2018-03-19T07:02:03Z
Comment #3 by github-bugzilla — 2018-03-23T04:30:11Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/94b728c0f9d1071d30f87ff0e261cfeb0a1c2ac1 Fix issue 18242 - Warn if object.Exception is missing https://github.com/dlang/dmd/commit/2b4c6269828213655f624134ccd8af27c1395737 Merge pull request #8050 from LemonBoy/throw-miss Fix issue 18242 - Warn if object.Exception is missing merged-on-behalf-of: Mike Franklin <[email protected]>