Discussion:
[Xcb] [Bug 104769] New: libxcb-1.12: optimizations above -O1 causing multiple applications to stop working
b***@freedesktop.org
2018-01-24 14:54:42 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=104769

Bug ID: 104769
Summary: libxcb-1.12: optimizations above -O1 causing multiple
applications to stop working
Product: XCB
Version: 1.12
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Library
Assignee: ***@lists.freedesktop.org
Reporter: ***@jonasstein.de
QA Contact: ***@lists.freedesktop.org

initially reported on Gentoo https://bugs.gentoo.org/616402

Problem: TeamViewer 12 and
Adobe acroread 9.x and probably other closed source applications do not start
anymore

Workaround: compile with CFLAGS="-march=native -O1 -pipe"

Compiler used: gcc-6.4.0
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
b***@freedesktop.org
2018-01-27 09:29:55 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=104769

Uli Schlachter <***@znc.in> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO

--- Comment #1 from Uli Schlachter <***@znc.in> ---
AFAIR this was already reported on the mailing list some years ago and the
conclusion back then was "compiler bug". Any reason why you disagree with this?
At least, changing the optimisation level to make a segfault go away sound like
a compiler bug to me (or e.g. violation of aliasing rules, or something like
that, but why would that be specific to 32 bit software?).
Problem: TeamViewer 12 and Adobe acroread 9.x and probably other closed source applications do not start anymore
This only happens with closed source software and only on x86 (so 32 bit)?!
Uhm...

Could someone come up with a self-contained test case with a free license (even
WTFPL would be fine with me)?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
b***@freedesktop.org
2018-01-27 10:11:35 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=104769

--- Comment #2 from Remi Denis-Courmont <***@gmail.com> ---
(In reply to Uli Schlachter from comment #1)
Post by b***@freedesktop.org
AFAIR this was already reported on the mailing list some years ago and the
conclusion back then was "compiler bug". Any reason why you disagree with
this? At least, changing the optimisation level to make a segfault go away
sound like a compiler bug to me (or e.g. violation of aliasing rules, or
something like that, but why would that be specific to 32 bit software?).
As such that could be a compiler bug, a library bug or an application bug.
Without any informations, I would actually argue that compiler bug is the least
likely of all three.

Without a source-level test case, it is almost impossible to say which is it.
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
b***@freedesktop.org
2018-01-28 14:46:54 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=104769

--- Comment #3 from Jonas Stein <***@jonasstein.de> ---
Could you provide a link to the mailing list archive, where this bug was a
topic?
We have not found any open source application which has the same problem.
Was it reported upstream as gcc bug?
If it is really a gcc bug, it would be interesting to locate it, because users
reported about this problem in the latest gcc-6 and gcc-7.
We will continue to search an open source package with the same problem, so
that we can track the problem better. Please let me know if there is other
interesting information we should collect.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
b***@freedesktop.org
2018-01-29 16:21:06 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=104769

--- Comment #4 from Emil Velikov <***@gmail.com> ---
Some ideas:
- bisect which exact compiler optimisation flag triggers it
- compare the generated code with/without said flag
- based on the findings - pin-point who's 'to blame'
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
b***@freedesktop.org
2018-02-02 16:45:43 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=104769

--- Comment #5 from Uli Schlachter <***@znc.in> ---
The thread starts at
https://lists.freedesktop.org/archives/xcb/2016-June/010795.html.
https://lists.freedesktop.org/archives/xcb/2016-June/010815.html concludes (I
think) that according to gdb there should be no crash.
https://lists.freedesktop.org/archives/xcb/2016-June/010819.html says that
nothing crashes with gcc 5.3.
https://lists.freedesktop.org/archives/xcb/2016-June/010828.html is the last
mail in the thread where the reporter will provide further data "tomorrow"
(that's almost two years ago).

To add to Emil's suggestions: Since the link above says that this was
introduced with libxcb 1.12, you could also git bisect the xcb repository to
find out where "things go downhill" (although this might be hard since other
libraries might use newer libxcb features).
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
b***@freedesktop.org
2018-06-11 03:01:46 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=104769

Matt Turner <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW

--- Comment #6 from Matt Turner <***@gmail.com> ---
Commenter in https://bugs.gentoo.org/616402 (really annoying that
bugs.gentoo.org isn't an allowed domain for "See Also") says that
-mstackrealign fixes it.

Other related bugs: https://bugs.freedesktop.org/show_bug.cgi?id=15693
https://bugs.freedesktop.org/show_bug.cgi?id=86788

Other projects like pixman and Mesa have implemented workarounds.
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
Loading...