glib2.0 >=2.67.3 breaks include from an extern C context
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glib2.0 (Ubuntu) |
Fix Released
|
Undecided
|
Iain Lane | ||
open-vm-tools (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
qemu (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
ukui-control-center (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
wireshark (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
qemu now breaks in Hirsute (it didn't 23h ago)
Broken:
https:/
Good before:
https:/
Error:
../../disas/
In file included from /usr/include/
/usr/include/
56 | template<typename _Tp, _Tp __v>
| ^~~~~~~~
../../disas/
20 | extern "C" {
| ^~~~~~~~~~
Also in disas/nanomips.cpp, ...
And indeed disas/arm-a64.cc has:
20 extern "C" {
21 #include "qemu/osdep.h"
22 #include "disas/dis-asm.h"
23 }
Through the chain of headers as reported above this gets to the templates
in /usr/include/
So C++ constructs within a C scope which is this bug.
Upstream qemu has not recently changed yet for this.
The code is the same since 2016 via commit e78490c44: "disas/arm-a64.cc:
Include osdep.h first" by Peter Maydell.
But what was different before to break it now?
To find that I was comparing Hirsute vs Hirsute-proposed ...
It is indeed failing in -proposed but working in hirsute-release.
10.2.1-20ubuntu1 : bad
repro in broken build:
$ cd /root/qemu-
$ c++ -Ilibcommon.fa.p -I. -I../.. -Iqapi -Itrace -Iui -Iui/shader -I/usr/
With that I have a test env...
Doko asked me to test
https:/
That fails as well, but also good as well as bad case have 10.10.2.1-20ubuntu1
It must be something else.
The difference were ~340 packages I was upgrading them to spot what broke it.
I eventually found glib 2.66 -> 2.67 to break it.
libglib2.
libglib2.
libglib2.
libglib2.
libglib2.
Old:
/*
* We can only use __typeof__ on GCC >= 4.8, and not when compiling C++. Since
* __typeof__ is used in a few places in GLib, provide a pre-processor symbol
* to factor the check out from callers.
*
* This symbol is private.
*/
#undef g_has_typeof
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) && !defined(
#define g_has_typeof
#endif
New:
/*
* We can only use __typeof__ on GCC >= 4.8, and not when compiling C++. Since
* __typeof__ is used in a few places in GLib, provide a pre-processor symbol
* to factor the check out from callers.
*
* This symbol is private.
*/
#undef glib_typeof
#if !defined(
((
defined(
#define glib_typeof(t) __typeof__ (t)
#elif defined(
/* C++11 decltype() is close enough for our usage */
#include <type_traits> <--- THIS IS WHAT BREAKS US
#define glib_typeof(t) typename std::remove_
#define glib_typeof_2_68
#endif
On the glib side this is due to:
https:/
Also related:
https:/
https://<email address hidden>
Qemu try to fix/discussion at:
https:/
This won't be the final solution, but it gets things going for the time being.
glib try to fix (also seems not to be ok for upstream, but would get everything going for now). Thanks Laney btw:
https:/
CVE References
description: | updated |
Changed in qemu (Ubuntu): | |
status: | New → Triaged |
Changed in ukui-control-center (Ubuntu): | |
status: | New → Triaged |
Changed in wireshark (Ubuntu): | |
status: | Confirmed → In Progress |
Also caused FTBFS in ukui-control-center
https:/ /launchpadlibra rian.net/ 524640709/ buildlog_ ubuntu- hirsute- amd64.ukui- control- center_ 3.0.2-2_ BUILDING. txt.gz