-
Notifications
You must be signed in to change notification settings - Fork 135
Support matching bitstrings that are in fact binaries (size divisible by 8) #1978
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
base: main
Are you sure you want to change the base?
Support matching bitstrings that are in fact binaries (size divisible by 8) #1978
Conversation
bb34fe8 to
7bb58f2
Compare
576fb54 to
ffcc68d
Compare
…408) Closes #393 Once atomvm/AtomVM#1978 is merged and downstreamed, the eval_bits patch won't be needed (unless there are other unrelated patches in there OFC)
ffcc68d to
89e5cf8
Compare
5aa8f8c to
c2b0ede
Compare
bettio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is still an issue.
build-and-test (arm-linux-gnueabihf-gcc, -mcpu=cortex-a7 -mfloat-abi=hard -O2 -mthumb -mthumb-int is failing and this tells me there is a problem with JIT implementation.
We have to fix this before merging this PR. Maybe @pguyot has some advice here.
… by 8) Signed-off-by: Mateusz Front <[email protected]>
c2b0ede to
6c9843d
Compare
bettio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests keep failing:
test_binary_to_term:
CRASH
======
pid: <0.1.0>
Stacktrace:
[{test_binary_to_term,test_function,0,[{file,"/home/runner/work/AtomVM/AtomVM/tests/erlang_tests/test_binary_to_term.erl"},{line,316}]},{test_binary_to_term,start,0,[{file,"/home/runner/work/AtomVM/AtomVM/tests/erlang_tests/test_binary_to_term.erl"},{line,170}]}]
cp: #CP<module: 0, label: 52, offset: 2272>
x[0]: error
x[1]: {badmatch,<<1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,1,119,19,116,101,115,116,95,98,105,110,97,114,121,95,116,111,95,116,101,114,109,97,5,98,5,26,215,111,88,119,13,110,111,110,111,100,101,64,110,111,104,111,115,116,0,0,0,0,0,0,0,0,0,0,0,0,97,2>>}
x[2]: {2,2,74,1,[{0,8240},{0,27350}],error}
Stack
-----
<<88,119,13,110,111,110,111,100,101,64,110,111,104,111,115,116,0,0,0,0,0,0,0,0,0,0,0,0>>
85645167
4
85
21
<<119,19,116,101,115,116,95,98,105,110,97,114,121,95,116,111,95,116,101,114,109>>
<<131,108,0,0,0,2,112,0,0,0,85,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,119,19,116,101,115,116,95,98,105,110,97,114,121,95,116,111,95,116,101,114,109,97,4,98,5,26,215,111,88,119,13,110,111,110,111,100,101,64,110,111,104,111,115,116,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,0,87,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,1,119,19,116,101,115,116,95,98,105,110,97,114,121,95,116,111,95,116,101,114,109,97,5,98,5,26,215,111,88,119,13,110,111,110,111,100,101,64,110,111,104,111,115,116,0,0,0,0,0,0,0,0,0,0,0,0,97,2,106>>
#CP<module: 0, label: 2, offset: 2760>
#CP<module: 0, label: 0, offset: 5424>
Mailbox
-------
Monitors
--------
**End Of Crash Report**
Expected 0 but result is not an integer
test_binary_to_term:FAILED
|
@bettio I'll try looking into it. There's also https://github.com/atomvm/AtomVM/actions/runs/20231091694/job/58073962162?pr=1978#step:18:596 failing, with disabled JIT 🤔 Instead of |
In some cases, there's generic code that uses the
bitstringmodifier because it needs to work for both bitstrings and binaries, for example in erl_eval. Currently such code doesn't work even if no actual bitstrings are involved, and this PR attempts to fix it. In other words, this now works:TODO:
jit.erl