-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #13902 distinct uint64 type corruption on 32-bit with borrow #13907
Conversation
6ca7d52
to
14edb5d
Compare
2f75e1f
to
3eead62
Compare
You don't have to, the CI already does this for 32 bit linux. |
How so? azure-pipelines.yml includes CPU:i386 (for which this test will run) and CPU:amd64 but I'm not seeing anything related to cross compilation (ie compile + run on a 64bit host (say CPU:amd64) a 32bit program. IMO it's an important use case that should have a regression test (it currently works when doing it manually inside a 64bit ubuntu (say a AWS VM), but is not being tested in CI) |
AFAICT, this is not necessary. To the compiler, the native architecture is just what to generate code for by default. So using `--cpu:i386` should yield the same code as a compiler compiled for i386 natively.
Also, Azure Pipelines don't have any 32 bit VM, so how do you think we're doing 32 bit CI? :)
|
that's assuming no bugs in implementation, and isolation from host machine environment, which, unless there's a regression test for it, is likely to lead to regressions.
I don't follow. We have this:
|
I'd invite you to study this: https://github.com/nim-lang/Nim/blob/devel/azure-pipelines.yml#L67-L108 We literally take a multilib compiler then force it to generate 32bit code :) That's how it's done. the Why does |
Can we have this in 1.2.2 as backport (cc @narimiran)? At Status, we currently use 1.2.0 with this patched in manually to workaround the breakage introduced in 1.2.0 (status-im/nimbus-eth2#829 (comment)). This also prevents people for targeting the |
@mratsim Definitely, but we wait for a more bugfixes for --gc:arc etc until we release 1.2.2. |
the standard way to do this is to have 1 branch per major.minor versions:
That way, ppl who need to stay on a non-devel version of nim (eg 1.2.x) can still benefit from latest bugfixes, with the caveat that only stable release tags (eg 1.2.2) are thoroughly tested (ie 1.2.x HEAD could theoretically introduce a regression in rare cases) |
....just like we're already doing it. |
EDIT: i think I found it: |
if you don't want to wait, simply send a PR like #14024 targeting branch version-1-2 (looks like that was the 1st PR targeting a branch other than devel so maybe discoverability could be improved in PR template), with all the caveats implied by a non-point release (but I guess a patch release could be added) |
Please, don't make your own rules for the stuff you're not in charge. Your PR #14024 was an exception, not a rule nor a guide how to do things. PRs should, as always, target P.S. This has already been backported to 1.2.x |
that PR was a backport (ie, via see #13876 (comment)
|
fix "distinct uint64" type corruption on 32-bit, when using {.borrow.} operators #13902 (regression introduced in catchable defects #13626)
note: also fixes this replated cpp codegen compilation error
nim cpp -r --skipParentCfg --skipUserCfg --cpu:i386 --passC:"-m32" --passL:-m32 --stacktrace:off --hints:off -f --lib:lib tests/ccgbugs/t13902.nim
note: couldnt' figure out how to make cross compile from linux 64 to 32 on work on CI machines, so I'm just testing without cross compilation
TODO after PR
fix other issues I raised in #13626 (comment) + other comments in that PR