[Bug tree-optimization/86850] ubsan: runtime error: member call on null pointer
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 6 14:01:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86850
--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
> diff --git a/gcc/vec.h b/gcc/vec.h
> index f8c039754d2..407269c5ad3 100644
> --- a/gcc/vec.h
> +++ b/gcc/vec.h
> @@ -1688,7 +1688,7 @@ template<typename T>
> inline void
> vec<T, va_heap, vl_ptr>::splice (const vec<T, va_heap, vl_ptr> &src)
> {
> - if (src.m_vec)
> + if (src.length ())
> m_vec->splice (*(src.m_vec));
> }
I can confirm that ubsan GCC is not happy and no run-time error is reported.
More information about the Gcc-bugs
mailing list