Projects

Ticket #573 (closed defect: fixed)

Opened 6 months ago

Last modified 8 weeks ago

Creating a void pointer causes abort()

Reported by: carlo@… Owned by: lsansonetti@…
Priority: major Milestone: MacRuby 0.7
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 months ago.

Change History

Changed 6 months ago by danielcavanagh@…

  • cc danielcavanagh@… added

Cc Me!

Changed 6 months 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 months ago by danielcavanagh@…

Changed 8 weeks ago by martinlagardette@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from MacRuby 0.5 to MacRuby 0.7

Fixed with r4203 ;-)

Note: See TracTickets for help on using tickets.