- Notifications
You must be signed in to change notification settings - Fork5
Commiteda5e90
committed
Don't trust CreateFileMapping() to clear the error code on success.
We must test GetLastError() even when CreateFileMapping() returns anon-null handle. If that value were left over from some previous systemcall, we might be fooled into thinking the segment already existed.Experimentation on Windows 7 suggests that CreateFileMapping() clearsthe error code on success, but it is not documented to do so, so let'snot rely on that happening in all Windows releases.Amit KapilaDiscussion: <20811.1474390987@sss.pgh.pa.us>1 parent93528f7 commiteda5e90
1 file changed
+3
-0
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
681 | 681 |
| |
682 | 682 |
| |
683 | 683 |
| |
| 684 | + | |
| 685 | + | |
| 686 | + | |
684 | 687 |
| |
685 | 688 |
| |
686 | 689 |
| |
|
0 commit comments
Comments
(0)