chakra-core / chakra-core/ChakraCore
Aborted in lib/Common/CommonPal.h
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
### Version
Branch: `master`
commit: `c3ead3f8a6e0bb8e32e043adc091c68cba5935e9
`
### Poc is:
```
function module(stdlib)
{
"use asm"
var fr = stdlib.Math.fround;
function foo()
{
var s = fr(10.5);
var i = fr(20);
var g = fr(30);
var h = fr(42.42);
var j = fr(19.5);
var c = 125.5
i = fr(s - i);
g = fr(g/s);
c = +j;
h = fr(s*h);
s = fr(+j);
return fr(fr(s + i) +fr( g + h ));
}
return foo;
}
var x = module({Math:Math});
WScript.Echo(module());
WScript.Echo(x());
```
### Build
In release build `./build.sh --sanitize=address --static -j `
### Execute the poc
I get
```
Aborted.
```
### Backtrace
```
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/tangsong/engines/all_version/ChakraCore/ChakraCore-2023-6/sanitize/ch /home/tangsong/FuzzingOut/Superion/ch_crashes/ch_06/id:000000,sig:06,src:000060,op:python,pos:0
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ff7f0b67700 (LWP 24070)]
[New Thread 0x7ff7ebfff700 (LWP 24071)]
[New Thread 0x7ff7eb7fe700 (LWP 24092)]
Thread 1 "ch" received signal SIGILL, Illegal instruction.
0x0000555555cd6bb9 in DebugBreak () at /root/ChakraCore-2023-6/lib/Common/CommonPal.h:161
161 in /root/ChakraCore-2023-6/lib/Common/CommonPal.h
(gdb) bt
#0 0x0000555555cd6bb9 in DebugBreak () at /root/ChakraCore-2023-6/lib/Common/CommonPal.h:161
#1 ReportFatalException (context=, exceptionCode=, reasonCode=, scenario=)
at /root/ChakraCore-2023-6/lib/Common/Exceptions/ReportError.cpp:20
#2 0x0000555555cd6fb7 in OutOfMemory_unrecoverable_error () at /root/ChakraCore-2023-6/lib/Common/Exceptions/ReportError.cpp:145
#3 0x00005555578c8dfa in Js::Exception::RaiseIfScriptActive (scriptContext=0x0, kind=0, returnAddress=0x0)
at /root/ChakraCore-2023-6/lib/Runtime/Base/Exception.cpp:20
#4 0x0000555555cd7539 in Js::Throw::OutOfMemory () at /root/ChakraCore-2023-6/lib/Common/Exceptions/Throw.cpp:122
#5 0x000055555645c3e0 in Js::InterpreterStackFrame::ProcessLinkFailedAsmJsModule (this=0x7fffffffbaa0)
at /root/ChakraCore-2023-6/lib/Runtime/Language/InterpreterStackFrame.cpp:2910
#6 0x00005555564594ec in Js::InterpreterStackFrame::ProcessAsmJsModule (this=)
at /root/ChakraCore-2023-6/lib/Runtime/./Base/ThreadContext.h:1567
#7 0x0000555556418595 in Js::InterpreterStackFrame::Process (this=0x7fffffffbaa0)
at /root/ChakraCore-2023-6/lib/Runtime/Language/InterpreterStackFrame.cpp:3451
#8 0x0000555556415264 in Js::InterpreterStackFrame::InterpreterHelper (function=,
args=, returnAddress=, addressOfReturnAddress=,
asmJsReturn=0x0) at /root/ChakraCore-2023-6/lib/Runtime/Language/InterpreterStackFrame.cpp:2153
#9 0x0000555556413d7d in Js::InterpreterStackFrame::InterpreterThunk (layout=)
at /root/ChakraCore-2023-6/lib/Runtime/Language/InterpreterStackFrame.cpp:1833
#10 0x00007ffff2050f9a in ?? ()
#11 0x00007fffffffbf70 in ?? ()
#12 0x00005555571bf75e in amd64_CallFunction () at /root/ChakraCore-2023-6/lib/Runtime/Library/amd64/JavascriptFunctionA.S:100
Backtrace stopped: frame did not save the PC
```
Contributor guide
Assessment
This issue has not been assessed yet.