[Bug 146] ICE (segmentation fault)

via D.gnu d.gnu at puremagic.com
Wed Jul 23 06:17:27 PDT 2014


http://bugzilla.gdcproject.org/show_bug.cgi?id=146

--- Comment #3 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
the source of the bug is in d-ctype.cc, in TypeFunction::toCtype().

there is this code: 'Type *tn = next->baseElemOf();', but 'next' can be NULL
here due to code 'if (isref) ret_type = build_reference_type (ret_type);'.

there is the check for null before 'if' (and ret_type becomes void_type_node),
but then build_reference_type changes ret_type to something another, and 'if
(ret_type != void_type_node)' check fails.

it's easy to add some checks, but i don't understand gdc internals enough to
decide where this check should go.


the problem is definitely in gdc backend, it's not frontend-related. let's wait
for Iain then.

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20140723/0b953854/attachment.html>


More information about the D.gnu mailing list