pthread_create() munging malloc()ed memory? (malloc(), threads, and static linking) [RPI-B+, 10.1]

Erich Dollansky erichsfreebsdlist at alogt.com
Wed Mar 18 11:59:57 UTC 2015


Hi,

On Tue, 17 Mar 2015 23:31:52 -0500
"Molly (Dev Lists)" <mollydevlists at icloud.com> wrote:

> I'm encountering some strange behavior where memory passed as an

it is really strange.

> Any ideas/suggestions?
> 
> 
> This is running on a Raspberry Pi B+ using the 10.1-RELEASE image
> (FreeBSD 10.1-RELEASE #0 r274401).  clang is version 3.4.1 (the
> version included in the base system).
> 
I did some tests on the same hardware with a older r272167 revision and
came to the same result.

I found after some time that the error is not cause by the creation of
the thread but by joining it. If you leave the join away, it works as
expected.

The error also comes back after 51 runs.

I also ran your program on an amd64 without any problems. 

Erich


More information about the freebsd-arm mailing list