When I run an X session, and I close the lid of my laptop, my session terminates.
Here's a stack trace from a crashed session:
Backtrace:
0: /usr/bin/X(xf86SigHandler+0x96) [0x80b9248]
1: [0xffffe420]
2: /lib/libc.so.6(strtoul+0x3e) [0xb7d4966e]
3: /usr/bin/X [0x80c8f66]
4: /usr/bin/X(xf86HandlePMEvents+0x2f) [0x80a644b]
5: /usr/bin/X(xf86Wakeup+0x131) [0x80ba1cc]
6: /usr/bin/X(WakeupHandler+0x41) [0x8083f48]
7: /usr/bin/X(WaitForSomething+0x21c) [0x815054c]
8: /usr/bin/X(Dispatch+0x7f) [0x8080f64]
9: /usr/bin/X(main+0x4cb) [0x806e668]
10: /lib/libc.so.6(__libc_start_main+0xd8) [0xb7d32878]
11: /usr/bin/X(FontFileCompleteXLFD+0xa1) [0x806dad1]
I believe the same problem has been reported upon in, https://bugs.freedesktop.org/show_bug.cgi?id=5140, as the backtrace is similar.
However bug 5140 suggests that it is sloved in 7.1.
I've recompiled my X server in debug and produced a core. With the core, it was
clear that on lines 76 and 82 the file hw/xfree86/os-support/linux/lnx_acpi.c,
the result of strtok is not checked to be non-null. Hence a null-pointer is
passed to strtoul, which crashes strtoul and the X server. Indeed, checking the
result of strtok before passing it to strtoul solves the problem.
When I run an X session, and I close the lid of my laptop, my session terminates. X(xf86SigHandle r+0x96) [0x80b9248] so.6(strtoul+ 0x3e) [0xb7d4966e] X(xf86HandlePME vents+0x2f) [0x80a644b] X(xf86Wakeup+ 0x131) [0x80ba1cc] X(WakeupHandler +0x41) [0x8083f48] X(WaitForSometh ing+0x21c) [0x815054c] X(Dispatch+ 0x7f) [0x8080f64] X(main+ 0x4cb) [0x806e668] so.6(__ libc_start_ main+0xd8) [0xb7d32878] X(FontFileCompl eteXLFD+ 0xa1) [0x806dad1] /bugs.freedeskt op.org/ show_bug. cgi?id= 5140, as the backtrace is similar.
Here's a stack trace from a crashed session:
Backtrace:
0: /usr/bin/
1: [0xffffe420]
2: /lib/libc.
3: /usr/bin/X [0x80c8f66]
4: /usr/bin/
5: /usr/bin/
6: /usr/bin/
7: /usr/bin/
8: /usr/bin/
9: /usr/bin/
10: /lib/libc.
11: /usr/bin/
I believe the same problem has been reported upon in,
https:/
However bug 5140 suggests that it is sloved in 7.1.
I've recompiled my X server in debug and produced a core. With the core, it was os-support/ linux/lnx_ acpi.c,
clear that on lines 76 and 82 the file hw/xfree86/
the result of strtok is not checked to be non-null. Hence a null-pointer is
passed to strtoul, which crashes strtoul and the X server. Indeed, checking the
result of strtok before passing it to strtoul solves the problem.