ufairiya / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

bind functions need mutex protection analog to mg_set_option #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create application with at least one mg_bind_* call
2. run mongoose with valgrind --tool=helgrind mongoose
3. perform a single http request for the callback in step 1
4. see "possible data race" messages in find_callback() / mg_bind_* calls

What is the expected output? What do you see instead?
I would like to see no messages.

What version of the product are you using? On what operating system?
latest mongoose, Ubuntu or Suse, valgrind 3.4.1

Please provide any additional information below.
proposal: I added a bind_mutex in mg_context and lock/unlock function in
mg_bind() and find_callback() (see attachment, search for bind_mutex)
this solved the problem (not a hard problem, but I need to analyze my own
thread bugs in my callbacks without the clutter) for me

greetings

Original issue reported on code.google.com by Mario.Kl...@googlemail.com on 27 May 2009 at 8:44

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by valenok on 27 May 2009 at 8:51

GoogleCodeExporter commented 9 years ago
Submitted http://code.google.com/p/mongoose/source/detail?r=395
Thanks!

Original comment by valenok on 27 May 2009 at 2:59