| Previous | 199869 Revisions | Next |
| r34138 Thursday 1st January, 2015 at 14:02:21 UTC by Oliver Stöneberg |
|---|
| "fixed" uninitialized memory usage/data race in osd_work_item_wait (nw) appears to be a Linux-only issue |
| [src/osd/sdl] | sdlwork.c |
| [src/osd/windows] | winwork.c |
| r242649 | r242650 | |
|---|---|---|
| 428 | 428 | return NULL; |
| 429 | 429 | item->event = NULL; |
| 430 | 430 | item->queue = queue; |
| 431 | item->done = FALSE; | |
| 431 | 432 | } |
| 433 | else | |
| 434 | { | |
| 435 | atomic_exchange32(&item->done, FALSE); // needs to be set this way to prevent data race/usage of uninitialized memory on Linux | |
| 436 | } | |
| 432 | 437 | |
| 433 | 438 | // fill in the basics |
| 434 | 439 | item->next = NULL; |
| r242649 | r242650 | |
| 436 | 441 | item->param = parambase; |
| 437 | 442 | item->result = NULL; |
| 438 | 443 | item->flags = flags; |
| 439 | atomic_exchange32(&item->done, FALSE); | |
| 440 | 444 | |
| 441 | 445 | // advance to the next |
| 442 | 446 | lastitem = item; |
| r242649 | r242650 | |
|---|---|---|
| 438 | 438 | return NULL; |
| 439 | 439 | item->event = NULL; |
| 440 | 440 | item->queue = queue; |
| 441 | item->done = FALSE; | |
| 441 | 442 | } |
| 443 | else | |
| 444 | { | |
| 445 | atomic_exchange32(&item->done, FALSE); // needs to be set this way to prevent data race/usage of uninitialized memory on Linux | |
| 446 | } | |
| 442 | 447 | |
| 443 | 448 | // fill in the basics |
| 444 | 449 | item->next = NULL; |
| 445 | 450 | item->callback = callback; |
| 446 | 451 | item->param = parambase; |
| 447 | 452 | item->result = NULL; |
| 448 | item->flags = flags; | |
| 449 | atomic_exchange32(&item->done, FALSE); | |
| 453 | item->flags = flags; | |
| 450 | 454 | |
| 451 | 455 | // advance to the next |
| 452 | 456 | lastitem = item; |
| https://github.com/mamedev/mame/commit/0c0260ec2de1cd9cff7f436d99a598e9a8f99ad8 |
| Previous | 199869 Revisions | Next |