Bug 467816

Summary: Coredump on TimeoutChecker::pauseTimeoutCheck when getitimer(, NULL, ), on 32bit _TIME_BITS=64
Product: [Frameworks and Libraries] frameworks-kjs Reporter: Taketo Kabe <dkabe>
Component: generalAssignee: Bernd Buschinski <b.buschinski>
Status: RESOLVED FIXED    
Severity: normal CC: christoph, kdelibs-bugs-null
Priority: NOR    
Version First Reported In: 5.96.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Patch t fix setitimer( , NULL, )

Description Taketo Kabe 2023-03-26 15:01:17 UTC
Created attachment 157590 [details]
Patch t fix setitimer( , NULL, )

Inputtinhg text in Google search box crashed konqueror.

STEPS TO REPRODUCE
1.  Prepare konquer with kf5-khtml enabled
2.  Nagivate http://www.google.co.jp/
3. Input some text USING some impot method

OBSERVED RESULT
konqueror coredump

EXPECTED RESULT
ko coredump

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  5.14.0-162.6.1.el9_1.0.1.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Nov 28 18:44:09 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
KDE Plasma Version:  5.24.6
KDE Frameworks Version:  5.96.0
Qt Version:  5.15.3

ADDITIONAL INFORMATION
Passing NULL to 2nd argument in
int setitimer(int which, const struct itimerval *new_value, struct itimerval *old_value)
is not supported. Kernel emits warning, and
glibc on 32bit with _TIME_BITS=64 will coredump immediatedy due to 
deferecencing new_value->it_interval.

The attached patch seems to fix this.
Comment 1 Christoph Cullmann 2023-07-03 20:21:18 UTC
*** Bug 467817 has been marked as a duplicate of this bug. ***
Comment 2 Christoph Cullmann 2023-07-03 20:22:00 UTC
Could you submit that as patch to the kf5 branch here:

https://invent.kde.org/frameworks/kjs/-/merge_requests
Comment 3 Taketo Kabe 2023-07-08 17:59:42 UTC
FIxed in merge https://invent.kde.org/frameworks/kjs/-/merge_requests/10
Comment 4 Christoph Cullmann 2023-07-08 18:37:58 UTC
Thanks for helping to get that fix in.