Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 09 Oct 2016 21:20:18 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 197888] [patch] devel/codeblocks: Crashes on startup with coredump when compiled with Clang (-O2)
Message-ID:  <bug-197888-13-b4MylAHF3k@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-197888-13@https.bugs.freebsd.org/bugzilla/>
References:  <bug-197888-13@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D197888

Dimitry Andric <dim@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dim@FreeBSD.org

--- Comment #18 from Dimitry Andric <dim@FreeBSD.org> ---
(In reply to Andriy Voskoboinyk from comment #14)
> Created attachment 174486 [details]
> Disable optimizations for wxPGProperty::Init(const wxString&, const
> wxString&)
>=20
> The patch 'fixes' the problem for me (constructor tries to compare refere=
nce
> address with NULL - and comparisons are optimized away, because "A refere=
nce
> 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 u=
se
> 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. :)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-197888-13-b4MylAHF3k>