threads/126950: rtld malloc is thread-unsafe

agile at sunbay.com agile at sunbay.com
Fri Aug 29 23:30:04 UTC 2008


The following reply was made to PR threads/126950; it has been noted by GNATS.

From: agile at sunbay.com
To: "Alexander Kabaev" <kabaev at gmail.com>
Cc: bug-followup at FreeBSD.org
Subject: Re: threads/126950: rtld malloc is thread-unsafe
Date: Sat, 30 Aug 2008 02:00:10 +0300 (EEST)

 Thx for hint, Alexander. There only two functions, that called without
 bind lock:
 
 objlist_call_init,
 objlist_call_fini,
 
 they both use
 
 errmsg_save (which call xstrdup)
 errmsg_restore (which call free)
 
 Need to move them under exclusive bind lock protection.
 
 > 1. The locking implementation in this patch is broken.
 > 2. rtld malloc is not supposed to be called from multiple threads and
 > needs to be protected by exclusive bind lock. If there are code
 > sections that call malloc without exclusive lock held, rtld
 > should be fixed to move them under lock protection.
 >
 > --
 > Alexander Kabaev
 >
 
 


More information about the freebsd-threads mailing list