View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0002679 | NetSurf | [All Projects] General | public | 2019-06-27 18:55 | 2019-07-19 08:23 | ||||
Reporter | Michael Forney | ||||||||
Assigned To | John-Mark Bell | ||||||||
Severity | minor | Reproducibility | always | ||||||
Status | closed | Resolution | fixed | ||||||
Product Version | 3.9 | ||||||||
Target Version | 3.9 | Fixed in Version | 3.9 | ||||||
Summary | 0002679: _ALIGNED used in public header in libdom | ||||||||
Description | When building netsurf with `LDFLAGS=-Wl,--warn-common`, I noticed many warnings of duplicate definitions for a global variable named _ALIGNED, for example: /usr/bin/ld: build/Linux-gtk/utils_libdom.o and build/Linux-gtk/build_Linux-gtk_duktape_application_cache.o: warning: multiple common of `_ALIGNED' It looks like _ALIGNED is defined in the netsurf buildsystem as __attribute__((aligned)). However, since it is used in the public header dom/core/string.h, this means that _ALIGNED needs to be defined when building every source file that includes it. Since _ALIGNED isn't defined when building netsurf itself, every source file that includes dom/core/string.h ends up treating it as a definition of a global variable called _ALIGNED. I'm not sure how best to resolve this, but I do have some questions and suggestions. Why is _ALIGNED needed for dom_string? It was added in 98e480e4[0] without much explanation. Looking through the commit history, I see that originally when dom_string was split up (in 79e6a0be[1]), dom_string was *not* used as the first member of dom_string_internal, and instead aliased with dom_string_internal. 98e480e4[0] fixes this by making dom_string the first member of dom_string_internal, but also adds _ALIGNED. I'm having trouble coming up with a reason why the increased alignment of dom_string is required. If _ALIGNED is indeed necessary, maybe it should be added to the pkg-config file for libdom, so that it gets defined properly for software that uses it. Or, if dom_string is only ever allocated through dom_string_internal, maybe it could be moved to the `base` member of dom_string_internal? [0] http://git.netsurf-browser.org/libdom.git/commit/?id=98e480e454b9604a714558bdb7d6a355f2eb1f60 [1] http://git.netsurf-browser.org/libdom.git/commit/?id=79e6a0beb0fa7f8a7d3096947413846a3e9ca546 | ||||||||
Tags | No tags attached. | ||||||||
Fixed in CI build # | |||||||||
Reported in CI build # | |||||||||
URL of problem page | |||||||||
Attached Files |
|
![]() |
|
Vincent Sanders (administrator) 2019-06-30 11:52 |
removed usage of unnecessary _ALIGNED macro in libdom public headers http://source.netsurf-browser.org/libdom.git/commit/?id=e2b00b3f3cb8bd29607cd08265312d2bb79b2d9d |
Vincent Sanders (administrator) 2019-07-19 08:23 |
we believe this issue has been resolved in NetSurf 3.9 |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2019-06-27 18:55 | Michael Forney | New Issue | |
2019-06-30 11:52 | Vincent Sanders | Assigned To | => John-Mark Bell |
2019-06-30 11:52 | Vincent Sanders | Reproducibility | N/A => always |
2019-06-30 11:52 | Vincent Sanders | Status | new => resolved |
2019-06-30 11:52 | Vincent Sanders | Resolution | open => fixed |
2019-06-30 11:52 | Vincent Sanders | Product Version | => 3.9 |
2019-06-30 11:52 | Vincent Sanders | Fixed in Version | => 3.9 |
2019-06-30 11:52 | Vincent Sanders | Target Version | => 3.9 |
2019-06-30 11:52 | Vincent Sanders | Note Added: 0001975 | |
2019-07-19 08:23 | Vincent Sanders | Status | resolved => closed |
2019-07-19 08:23 | Vincent Sanders | Note Added: 0001995 |