Projects

Ticket #573 (new defect)

Opened 7 weeks ago

Last modified 6 weeks ago

Creating a void pointer causes abort()

Reported by: carlo@… Owned by: lsansonetti@…
Priority: major Milestone: MacRuby 0.5
Component: MacRuby Keywords:
Cc: danielcavanagh@…

Description

When creating a void pointer (Pointer.new_with_type("v")), the app exits:

Assertion failed: (Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!"), function getTypeSizeInBits, file TargetData.cpp, line 397. Abort trap

Tested in MR 0.5b2 on Snow Leopard.

Attachments

void size bug.diff Download (2.7 KB) - added by danielcavanagh@… 6 weeks ago.

Change History

Changed 6 weeks ago by danielcavanagh@…

  • cc danielcavanagh@… added

Cc Me!

Changed 6 weeks ago by danielcavanagh@…

a patch to fix this issue

firstly, it refactors the new-pointer code to avoid querying the size of void and reduces duplication as a side effect

secondly, it alters get_sizeof() to not query llvm when passed an unsized typed, in case this happens again. really llvm should be doing this, but it doesn't so we just have to deal with it

Changed 6 weeks ago by danielcavanagh@…

Note: See TracTickets for help on using tickets.