--- Begin Message ---
Subject: |
[PATCH 0/1] regex stack overflow in gdb-jsonify-buffer |
Date: |
Wed, 27 Dec 2017 11:32:10 -0400 |
https://stackoverflow.com/questions/2882488/debugging-in-emacs-with-gud-often-results-in-stack-overflow-error
In some of my C++ projects, gdb will happily print 60+k characters for the value
of a local, which causes a stack overflow in the regex used by
gdb-jsonify-buffer. This patch instead looks for the start of a string literal
and uses (forward-sexp) to skip it, which was proposed in the answer to the
stackoverflow question above. This results in the same output in the tests that
I've done, but I wouldn't say it's been extensively tested.
David McFarland (1):
Fix regex stack overflow when parsing complex gdb locals
lisp/progmodes/gdb-mi.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.15.1
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#29868: [PATCH 1/1] Fix regex stack overflow when parsing complex gdb locals |
Date: |
Sat, 30 Dec 2017 13:16:57 +0200 |
> From: David McFarland <address@hidden>
> Date: Wed, 27 Dec 2017 11:32:11 -0400
> Cc: David McFarland <address@hidden>
>
> * lisp/progmodes/gdb-mi.el (gdb-jsonify-buffer): Skip string literals
> with (forward-sexp) instead of matching with regex.
>
> Copyright-paperwork-exempt: yes
Thanks, pushed to the master branch.
--- End Message ---