SWI-Prolog / swipl-devel

SWI-Prolog Main development repository
http://www.swi-prolog.org
Other
954 stars 172 forks source link

CLEANUP: Silence UBSAN message #1275

Closed mgondan closed 4 months ago

mgondan commented 4 months ago

Silences the following warning:

/.../swipl-devel/src/pl-thread.c:7649:5: runtime error: null pointer passed as argument 1, which is declared to never be null /.../swipl-devel/src/pl-thread.c:7649:5: runtime error: null pointer passed as argument 2, which is declared to never be null

In the call that raises the error, arg1 and arg2 from a memcpy(arg1, arg2, bytes) are NULL, but bytes is also 0.

mgondan commented 4 months ago

I see it has already been implemented. Closing this PR.