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

Issue 1091023002: Fix locking for printing error messages. (Closed)

Created:
5 years, 8 months ago by Karl
Modified:
5 years, 8 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix locking for printing error messages. The method TopLevelParser::ErrorAt applies a lock to print the error message. Unfortunately, it keeps the lock longer than necessary, resulting in deadlock (on following fatal message) if error recovery is not allowed. Fixed by limiting scope of lock to only apply to the printing of the error message. Modified ClFlags to allow a "reset", and made ClFlags modifiable by bitcode munge tests. This allowed us to test this problem as a unit test. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4138 R=jvoung@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=187b3dfab5cca45e2af192bf7f5db09bcc156314

Patch Set 1 #

Patch Set 2 : Fix nits. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -30 lines) Patch
M src/IceClFlags.h View 1 chunk +2 lines, -19 lines 0 comments Download
M src/IceClFlags.cpp View 1 chunk +37 lines, -0 lines 0 comments Download
M src/PNaClTranslator.cpp View 1 chunk +6 lines, -4 lines 3 comments Download
M unittest/BitcodeMunge.h View 1 3 chunks +14 lines, -1 line 0 comments Download
M unittest/BitcodeMunge.cpp View 1 1 chunk +12 lines, -6 lines 0 comments Download
M unittest/IceParseInstsTest.cpp View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
Karl
5 years, 8 months ago (2015-04-16 17:06:40 UTC) #2
jvoung (off chromium)
Thanks Karl! Mostly looks good but I had a question. https://codereview.chromium.org/1091023002/diff/20001/src/PNaClTranslator.cpp File src/PNaClTranslator.cpp (right): https://codereview.chromium.org/1091023002/diff/20001/src/PNaClTranslator.cpp#newcode497 ...
5 years, 8 months ago (2015-04-16 19:11:52 UTC) #3
Karl
https://codereview.chromium.org/1091023002/diff/20001/src/PNaClTranslator.cpp File src/PNaClTranslator.cpp (right): https://codereview.chromium.org/1091023002/diff/20001/src/PNaClTranslator.cpp#newcode497 src/PNaClTranslator.cpp:497: Fatal(); On 2015/04/16 19:11:52, jvoung wrote: > I was ...
5 years, 8 months ago (2015-04-16 19:58:51 UTC) #4
jvoung (off chromium)
LGTM https://codereview.chromium.org/1091023002/diff/20001/src/PNaClTranslator.cpp File src/PNaClTranslator.cpp (right): https://codereview.chromium.org/1091023002/diff/20001/src/PNaClTranslator.cpp#newcode497 src/PNaClTranslator.cpp:497: Fatal(); On 2015/04/16 19:58:51, Karl wrote: > On ...
5 years, 8 months ago (2015-04-16 20:22:47 UTC) #5
Karl
You make a good point about using a "LogStream" to put errors to, rather than ...
5 years, 8 months ago (2015-04-16 20:33:00 UTC) #6
Karl
5 years, 8 months ago (2015-04-16 20:50:48 UTC) #7
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
187b3dfab5cca45e2af192bf7f5db09bcc156314 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698