Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Issue 1092513002: Cherrypick 229035: Fix error checking in get_temp_file_name(). (Closed)

Created:
5 years, 8 months ago by jvoung (off chromium)
Modified:
5 years, 8 months ago
CC:
native-client-reviews_googlegroups.com, Sam Clegg
Base URL:
https://chromium.googlesource.com/native_client/pnacl-libcxx.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Cherrypick 229035: Fix error checking in get_temp_file_name(). Checking errno without first checking that the call failed means that if some other call prior to mkstemp failed with EINVAL prior to this, the assert would fire even if mkstemp succeeded. If something failed with EEXIST, it would go in to an infinite loop. Change-Id: I3f140a3e15fe08664a38a8c9a950c4ed547eb481 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@229035 91177308-0d34-0410-b5e6-96231b3b80d8 BUG=none -- infinite looping bot R=dschuff@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-libcxx.git;a=commit;h=640116b36573795793453c2b0671b161deb9256f

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -4 lines) Patch
M test/support/platform_support.h View 1 chunk +7 lines, -4 lines 4 comments Download

Messages

Total messages: 10 (3 generated)
jvoung (off chromium)
5 years, 8 months ago (2015-04-15 22:27:57 UTC) #2
Derek Schuff
LGTM interesting, so does sbc's addition of O_EXCL to open change the behavior of mkstemp?
5 years, 8 months ago (2015-04-15 22:34:47 UTC) #3
Derek Schuff
thanks for chasing this down btw
5 years, 8 months ago (2015-04-15 22:34:55 UTC) #4
Roland McGrath
https://codereview.chromium.org/1092513002/diff/1/test/support/platform_support.h File test/support/platform_support.h (right): https://codereview.chromium.org/1092513002/diff/1/test/support/platform_support.h#newcode67 test/support/platform_support.h:67: if (FD == -1 && errno == EINVAL) { ...
5 years, 8 months ago (2015-04-15 22:35:22 UTC) #6
Sam Clegg
https://codereview.chromium.org/1092513002/diff/1/test/support/platform_support.h File test/support/platform_support.h (right): https://codereview.chromium.org/1092513002/diff/1/test/support/platform_support.h#newcode71 test/support/platform_support.h:71: } while (FD == -1); On 2015/04/15 22:35:22, Roland ...
5 years, 8 months ago (2015-04-15 22:40:10 UTC) #8
jvoung (off chromium)
For the record -- previously about four tests would fail because it ended up with ...
5 years, 8 months ago (2015-04-15 22:45:33 UTC) #9
jvoung (off chromium)
5 years, 8 months ago (2015-04-15 23:04:27 UTC) #10
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
640116b36573795793453c2b0671b161deb9256f (tree was closed).

Powered by Google App Engine
This is Rietveld 408576698