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

Issue 759283005: Don't call exit() after __debugbreak() on release builds. (Closed)

Created:
6 years ago by rvargas (doing something else)
Modified:
5 years, 4 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Don't call exit() after __debugbreak() on release builds. This CL optimizes code for debugging as opposed to for someone who attaches a debugger and goes beyond a CHECK without realizing it. Debugging a release build is already hard, especially on 64-bit builds. BUG=408820 R=wfh@chromium.org Committed: https://crrev.com/9e9ce3c56b155d66c4ee324edd19db6fe35fb876 Cr-Commit-Position: refs/heads/master@{#306871}

Patch Set 1 #

Patch Set 2 : Unit tests #

Patch Set 3 : fix andriod.... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -3 lines) Patch
M base/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
M base/base.gyp View 1 1 chunk +1 line, -0 lines 0 comments Download
A base/debug/debugger_unittest.cc View 1 2 1 chunk +43 lines, -0 lines 0 comments Download
M base/debug/debugger_win.cc View 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 25 (6 generated)
rvargas (doing something else)
6 years ago (2014-11-27 02:10:19 UTC) #1
Will Harris
On 2014/11/27 02:10:19, rvargas wrote: CHECK should always terminate the process, is there a risk ...
6 years ago (2014-11-27 03:10:24 UTC) #2
rvargas (doing something else)
On 2014/11/27 03:10:24, Will Harris OOO until 1 Dec wrote: > On 2014/11/27 02:10:19, rvargas ...
6 years ago (2014-12-01 19:00:58 UTC) #3
Will Harris
On 2014/12/01 19:00:58, rvargas wrote: > On 2014/11/27 03:10:24, Will Harris OOO until 1 Dec ...
6 years ago (2014-12-01 20:51:35 UTC) #4
rvargas (doing something else)
On 2014/12/01 20:51:35, Will Harris OOO until 1 Dec wrote: > On 2014/12/01 19:00:58, rvargas ...
6 years ago (2014-12-01 22:18:03 UTC) #5
Will Harris
On 2014/12/01 22:18:03, rvargas wrote: > On 2014/12/01 20:51:35, Will Harris OOO until 1 Dec ...
6 years ago (2014-12-01 22:28:48 UTC) #6
rvargas (doing something else)
On 2014/12/01 22:28:48, Will Harris OOO until 1 Dec wrote: > On 2014/12/01 22:18:03, rvargas ...
6 years ago (2014-12-01 22:54:32 UTC) #7
Will Harris
On 2014/12/01 22:54:32, rvargas wrote: > On 2014/12/01 22:28:48, Will Harris OOO until 1 Dec ...
6 years ago (2014-12-01 23:13:29 UTC) #9
rvargas (doing something else)
> Locals have worked in 64-bit release since we added /d2Zi to our builds. Also, ...
6 years ago (2014-12-02 01:06:41 UTC) #10
Will Harris
On 2014/12/02 01:06:41, rvargas wrote: > > Locals have worked in 64-bit release since we ...
6 years ago (2014-12-02 01:58:39 UTC) #11
cpu_(ooo_6.6-7.5)
Breakpad does not act as a debugger, it only uses the the unhandled exception filter, ...
6 years ago (2014-12-03 23:20:26 UTC) #14
rvargas (doing something else)
I added unit tests for the layer where this code lives (base). I verified that ...
6 years ago (2014-12-04 00:09:07 UTC) #17
Will Harris
lgtm. thanks for adding the tests. I would still be interested to hear of cases ...
6 years ago (2014-12-04 00:18:45 UTC) #18
rvargas (doing something else)
On 2014/12/04 00:18:45, Will Harris wrote: > lgtm. thanks for adding the tests. I would ...
6 years ago (2014-12-04 01:40:55 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/759283005/120001
6 years ago (2014-12-04 19:45:19 UTC) #21
commit-bot: I haz the power
Committed patchset #3 (id:120001)
6 years ago (2014-12-04 19:47:33 UTC) #22
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/9e9ce3c56b155d66c4ee324edd19db6fe35fb876 Cr-Commit-Position: refs/heads/master@{#306871}
6 years ago (2014-12-04 19:48:18 UTC) #23
Nico
On 2014/12/03 23:20:26, cpu (OOO until 8-15) wrote: > Breakpad does not act as a ...
5 years, 4 months ago (2015-08-17 17:15:25 UTC) #24
rvargas (doing something else)
5 years, 4 months ago (2015-08-17 18:41:01 UTC) #25
Message was sent while issue was closed.
On 2015/08/17 17:15:25, Nico wrote:
> On 2014/12/03 23:20:26, cpu (OOO until 8-15) wrote:
> > Breakpad does not act as a debugger, it only uses the the unhandled
exception
> > filter, which cannot skip execptions, at most it can olny do what __except()
> > can.
> > 
> > I don't think we should assert security guarantees while a process is
> debugged.
> > I think we need to make debugging a reliable experience.
> 
> Hm, I think this change makes debugging _less_ reliable. It makes sense if
> compilers can assume that CHECK(false) is noreturn, and because of that they
can
> opt to delete code after a CHECK(false) (and warn about it not having an
effect
> etc). With this change, what you're debugging no longer matches what the
> compiler sees.

In any case, what one debugs on a Release build is what we ship to users so I
don't follow an argument saying that one will be debugging something different
(something that the compiler doesn't see).

Also, no matter what, we'll have the need to run the released version of Chrome
under a debugger. Are you suggesting that we should just say "sorry, you cannot
debug that?". Assuming you are not saying that, why should we be making the
process of debugging a fault more difficult that what already is?

> 
> (Also see https://codereview.chromium.org/1224553002 where I did this change
in
> reverse for that reason.)
> 
> I don't think this change is a good idea.
> 
> (I saw this review because of
> http://code.google.com/p/chromium/issues/detail?id=520982 but I don't think
it's
> a good idea independent of that bug.)

I'm looking forward too see what went wrong with that bug.

Powered by Google App Engine
This is Rietveld 408576698