[Bug 197888] [patch] devel/codeblocks: Crashes on startup with coredump when compiled with Clang (-O2)
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Oct 9 21:20:21 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197888
Dimitry Andric <dim at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dim at FreeBSD.org
--- Comment #18 from Dimitry Andric <dim at FreeBSD.org> ---
(In reply to Andriy Voskoboinyk from comment #14)
> Created attachment 174486 [details]
> Disable optimizations for wxPGProperty::Init(const wxString&, const
> wxString&)
>
> The patch 'fixes' the problem for me (constructor tries to compare reference
> address with NULL - and comparisons are optimized away, because "A reference
> shall be initialized to refer to a valid object or function" and "a null
> reference cannot exist in a well-defined program"); probably, it should use
> pointers instead.
Yes, this code is full of undefined behaviour. It seems they also ran into
problems when compiling with newer versions of gcc, see:
https://sourceforge.net/p/codeblocks/code/10875/
But this workaround is pretty bad. They should rewrite the code to use
pointers, not in the least because they seem to abuse references as if they
were pointers. :)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list