Skip to content

Multiplication causing differing results for VM and YYC, int64 and number. #10029

@tinkerer-red

Description

@tinkerer-red

Description

Unsure ultimately what's going on here under the hood. But have been able to reproduce the issue with a much more narrow example, when multiplying an int64 by a number (which could be a valid int64) the resulting number is differs in value and type, leading to two different results on both yyc and vm.

https://api.gamemaker.io/api/github/downloads/af2036d9-652e-4938-96fa-d52ec7f45dac

Expected Change

given they are both integers I would have imagined the compiler would have tried its best to keep that consistency for speed. The issue may be present in other math ops too, but it would be easier to compare their code.

Steps To Reproduce

compile attached project in both vm and yyc to compare results.
for others who dont have access to the file, here is a trimmed down version with out the specialized debug logging:

var hash = int64(1578811012);
show_debug_message(typeof(hash))
hash *= 0x27d4eb2d
show_debug_message(typeof(hash))

How reliably can you recreate this issue using your steps above?

Always

Which version of GameMaker are you reporting this issue for?

2024.11.0 (Monthly)

Which platform(s) are you seeing the problem on?

Windows

Sample Package Attached?

  • I have attached my bug package

Sample Project Added?

  • I have included a small sample project

Metadata

Metadata

Labels

gms2-bugIn-game bugs with the "GameMaker Studio 2" runtimes

Projects

Status

Verified

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions