This forum has been archived. All content is frozen. Please use KDE Discuss instead.

null pointer error in Memory.h:510 with -fsanitize

Tags: None
(comma "," separated)
n2k
Registered Member
Posts
41
Karma
0
Hi,

I'm compiling an Eigen code with the following flags in gcc 5.1:

CFLAGS += -fsanitize=undefined
CFLAGS += -fsanitize=float-divide-by-zero
CFLAGS += -fsanitize=float-cast-overflow
CFLAGS += -fsanitize=address
CFLAGS += -fsanitize=unreachable

At run time I get
/usr/local/include/Eigen/src/Core/util/Memory.h:510:5: runtime error: null pointer passed as argument 2, which is declared to never be null

I don't know how serious his is but I thought that it would be good to report this finding.

Cheers!
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Indeed, memcpy might be called with a zero size and a null pointer. No big deal, but it will fixed in next release.
jbauer
Registered Member
Posts
25
Karma
0
Hello,

Did this bug fix make it into Eigen? With Eigen 3.2.8, GCC 5.3, and the undefined behavior sanitizer, I still encounter this error.

Thank you.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient