LLVM: array(2, x) creates an empty array

Bug #1101679 reported by Matt Giuca
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mars
Fix Committed
High
Matt Giuca

Bug Description

Expected:
?> array(2, 42)
[42, 42]

Actual:
?> array(2, 42)
[]

Only when using the LLVM backend.

Tags: llvm

Related branches

Revision history for this message
Matt Giuca (mgiuca) wrote :

This seems to be a memory corruption issue related to the garbage collector. Replacing all uses of GC_malloc with malloc resolves the issue.

Revision history for this message
Matt Giuca (mgiuca) wrote :

Also, the issue only occurs in the interpreter, not in the compiled code.

Revision history for this message
Matt Giuca (mgiuca) wrote :

Fixed in branch 'llvm-backend' r1308.

Yep, it was memory corruption, due to a <= that should have been < in a loop in the built-in implementation of array().

Changed in mars:
status: Triaged → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.