Bug 1804474

Summary: Missing ENDBR from mozjs60
Product: [Fedora] Fedora Reporter: H.J. Lu <hongjiu.lu>
Component: mozjs60Assignee: František Zatloukal <fzatlouk>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: codonell, fzatlouk, klember, law
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-15 10:42:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1802674    

Description H.J. Lu 2020-02-18 22:46:54 UTC
JITed code from mozjs60 doesn't have ENDBR:

Missing separate debuginfos, use: dnf debuginfo-installProgram terminated with signal SIGSEGV, Segmentation fault.
#0  0x00003727cac893a0 in ?? ()
[Current thread is 1 (Thread 0x7f098a99a200 (LWP 190870))]
(gdb) disass 0x00003727cac893a0,+30
Dump of assembler code from 0x3727cac893a0 to 0x3727cac893be:
=> 0x00003727cac893a0:	push   %rbp
   0x00003727cac893a1:	mov    %rsp,%rbp
   0x00003727cac893a4:	push   %rbx
   0x00003727cac893a5:	push   %r12
   0x00003727cac893a7:	push   %r13
   0x00003727cac893a9:	push   %r14
   0x00003727cac893ab:	push   %r15
   0x00003727cac893ad:	pushq  0x18(%rbp)
   0x00003727cac893b0:	mov    %rsp,%r14
   0x00003727cac893b3:	mov    %rsi,%r13
   0x00003727cac893b6:	test   $0x1,%r8b
   0x00003727cac893ba:	je     0x3727cac893c4
End of assembler dump.
(gdb) bt
#0  0x00003727cac893a0 in  ()
#1  0x00007f098c453f90 in EnterJit(JSContext*, js::RunState&, unsigned char*)
    () at /lib64/libmozjs-60.so.0
#2  0x00007f098c626149 in Interpret(JSContext*, js::RunState&) [clone .lto_priv.0] () at /lib64/libmozjs-60.so.0
#3  0x00007f098c641918 in js::RunScript(JSContext*, js::RunState&) ()
    at /lib64/libmozjs-60.so.0
#4  0x00007f098c61b65a in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) () at /lib64/libmozjs-60.so.0
#5  0x00007f098c61ba1d in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) ()
    at /lib64/libmozjs-60.so.0
#6  0x00007f098c2df17f in JS_CallFunctionValue(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) () at /lib64/libmozjs-60.so.0

Comment 1 H.J. Lu 2020-02-19 00:35:25 UTC
Loader allocates legacy bitmap for /lib64/libmozjs-60.so.0 since it isn't CET enabled.
But legacy bitmap doesn't cover JITTed code.

Comment 2 Ben Cotton 2020-08-11 13:08:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 3 František Zatloukal 2021-02-15 10:42:47 UTC
The mozjs60 package was retired from Fedora 34 and Fedora 35 as there are no more packages using it and newer versions are available (mozjs68 and mozjs78).

If this is still an issue in the latest mozjs78, please, work with upstream ( https://bugzilla.mozilla.org/ ) on fixing the issue (you can create tracking bug for mzojs78 here, if you want).