Ticket #1887 (closed bug: fixed)

Opened 11 years ago

Last modified 11 years ago

Integer PMC i_multiply bug

Reported by: Yuki`N Owned by: whiteknight
Priority: normal Milestone:
Component: core Version: master
Severity: high Keywords: gci
Cc: Language:
Patch status: Platform: all


The Integer PMC has a misbehaving i_multiply multimethod, called from the PIR opcode `mul $P0, $P1'.

The i_multiply VTABLE method is supposed to perform an in-place multiply on the first operand, but when used with the BigInt and Complex PMCs as the second operand, no multiplication is performed. Note that this works fine when using another PMC, i.e. the Float PMC, as the second operand.

Attached is a short snippet of new tests I wrote, all using the same mul opcode. Note that one of the three works correctly, while the other two do not.


integer-failing.t Download (0.7 KB) - added by Yuki`N 11 years ago.
Failing tests.

Change History

Changed 11 years ago by Yuki`N

Failing tests.

Changed 11 years ago by whiteknight

  • keywords gci added
  • owner set to whiteknight

Changed 11 years ago by whiteknight

  • status changed from new to closed
  • resolution set to fixed

Removing the multis for Complex and BigInt and allowing them to fallback to the default case is fine and doesn't cause any tests to break. I have a few other issues to discuss, but will post them to the list.

Fixed in 362335a

Note: See TracTickets for help on using tickets.