Closed
Bug 1167119
Opened 10 years ago
Closed 10 years ago
harfbuzz: member call on null pointer of type
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
People
(Reporter: mliska, Unassigned)
References
Details
(Whiteboard: [gfx-noted])
Attachments
(1 file)
|
2.20 KB,
patch
|
mozilla
:
feedback-
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
Steps to reproduce:
Add -fsanitize=null to compile options. This is second part of errors (#1165904):
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:227: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:804: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:227: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:1105:26: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:804: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:1105: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:1282: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:1283: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:1286: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:804: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:1286: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:1180: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:804: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:1180: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gpos-table.hh:827: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:804: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gpos-table.hh:827: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gpos-table.hh:1392:26: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:804: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gpos-table.hh:1392: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gpos-table.hh:1495: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gpos-table.hh:1496: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gpos-table.hh:1499: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:804: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gpos-table.hh:1499: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gpos-table.hh:1457: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:804: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gpos-table.hh:1457: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/layout/generic/nsBlockFrame.cpp:6168:51: runtime error: member call on null pointer of type 'struct nsBlockFrame'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:894: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:804: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:894: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:228: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:804: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:228: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:578: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:804: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:578: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gpos-table.hh:535: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:804: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gpos-table.hh:535: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
Updated•10 years ago
|
Component: Untriaged → Graphics
Product: Firefox → Core
Updated•10 years ago
|
Whiteboard: [gfx-noted]
Comment 2•10 years ago
|
||
(In reply to Jonathan Kew (:jfkthame) from comment #1)
> Behdad, any insight into this?
It's harmless. I have templates that have return statements with values, and returning void values is not possible, so I have this useless construct that I use instead of void:
hb-private.hh:struct _hb_void_t {};
hb-private.hh:typedef const _hb_void_t &hb_void_t;
hb-private.hh:#define HB_VOID (* (const _hb_void_t *) NULL)
I suppose I can replace last line with:
#define HB_VOID (_hb_void_t())
or something like that. Please play with it and let me know what works.
Flags: needinfo?(mozilla)
Comment 3•10 years ago
|
||
Martin, could you try Behdad's suggestion (above) and see if that helps? Thanks.
Flags: needinfo?(mliska)
Updated•10 years ago
|
Summary: hafbuzz: member call on null pointer of type → harfbuzz: member call on null pointer of type
| Reporter | ||
Comment 4•10 years ago
|
||
Hello.
With following patch applied:
diff --git a/gfx/harfbuzz/src/hb-private.hh b/gfx/harfbuzz/src/hb-private.hh
index 06d7f22..a923cae 100644
--- a/gfx/harfbuzz/src/hb-private.hh
+++ b/gfx/harfbuzz/src/hb-private.hh
@@ -248,7 +248,7 @@ ASSERT_STATIC (sizeof (hb_var_int_t) == 4);
/* Void! */
struct _hb_void_t {};
typedef const _hb_void_t &hb_void_t;
-#define HB_VOID (* (const _hb_void_t *) NULL)
+#define HB_VOID (_hb_void_t ())
/* Return the number of 1 bits in mask. */
static inline HB_CONST_FUNC unsigned int
I get probably identical list of errors (part):
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:230:20: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:805:72: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:230:20: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:1075:26: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:805:72: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:1075:26: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-common-private.hh:614:95: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-common-private.hh:615:7: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-common-private.hh:618:12: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:805:72: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-common-private.hh:618:12: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:1219:52: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:1137:12: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:805:72: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gsub-table.hh:1137:12: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gpos-table.hh:848:20: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:805:72: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gpos-table.hh:848:20: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gpos-table.hh:1381:25: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:805:72: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-gpos-table.hh:1381:25: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-common-private.hh:614:95: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-common-private.hh:615:7: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-ot-layout-common-private.hh:618:12: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
/home/marxin/Programming/gecko-dev/gfx/harfbuzz/src/hb-private.hh:805:72: runtime error: reference binding to null pointer of type 'const struct _hb_void_t'
Martin
Flags: needinfo?(mliska)
| Reporter | ||
Comment 5•10 years ago
|
||
Updated•10 years ago
|
Attachment #8617289 -
Flags: feedback?(mozilla)
Comment 6•10 years ago
|
||
That patch doesn't look good to me. How about this one:
diff --git a/src/hb-private.hh b/src/hb-private.hh
index 06d7f22..45afc20 100644
--- a/src/hb-private.hh
+++ b/src/hb-private.hh
@@ -247,8 +247,8 @@ ASSERT_STATIC (sizeof (hb_var_int_t) == 4);
/* Void! */
struct _hb_void_t {};
-typedef const _hb_void_t &hb_void_t;
-#define HB_VOID (* (const _hb_void_t *) NULL)
+typedef const _hb_void_t *hb_void_t;
+#define HB_VOID ((const _hb_void_t *) NULL)
Updated•10 years ago
|
Attachment #8617289 -
Flags: feedback?(mozilla) → feedback-
Updated•10 years ago
|
Flags: needinfo?(mliska)
Comment 8•10 years ago
|
||
Pushed to HarfBuzz master.
| Reporter | ||
Comment 9•10 years ago
|
||
Can you please close the issue?
Comment 10•10 years ago
|
||
Resolving this as fixed (bug was fixed upstream, and we've taken several harfbuzz updates since then).
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•