public inbox for archer-commits@sourceware.org help / color / mirror / Atom feed
From: ppluzhnikov@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-tromey-python: 2008-11-07 Paul Pluzhnikov <ppluzhnikov@google.com> Date: Sat, 08 Nov 2008 00:41:00 -0000 [thread overview] Message-ID: <20081108004147.6197.qmail@sourceware.org> (raw) The branch, archer-tromey-python has been updated via 1673e85f1048d7fc42cb3b75ed9e479450c520d0 (commit) from 935ac21122a22e4875032f0522f7b2e15d03858e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 1673e85f1048d7fc42cb3b75ed9e479450c520d0 Author: Paul Pluzhnikov <ppluzhnikov@google.com> Date: Fri Nov 7 16:41:20 2008 -0800 2008-11-07 Paul Pluzhnikov <ppluzhnikov@google.com> * python/python-type.c (typy_lookup_type): Fix "dangling" access. ----------------------------------------------------------------------- Summary of changes: gdb/ChangeLog | 4 ++++ gdb/python/python-type.c | 15 ++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) First 500 lines of diff: diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 41ba6ab..487e321 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,4 +1,8 @@ 2008-11-07 Paul Pluzhnikov <ppluzhnikov@google.com> + + * python/python-type.c (typy_lookup_type): Fix "dangling" access. + +2008-11-07 Paul Pluzhnikov <ppluzhnikov@google.com> * python/python-function.c (fnpy_call): Fix syntax error in last checkin. diff --git a/gdb/python/python-type.c b/gdb/python/python-type.c index 77bb489..9e5e2c3 100644 --- a/gdb/python/python-type.c +++ b/gdb/python/python-type.c @@ -134,17 +134,22 @@ typy_lookup_type (struct demangle_component *demangled, { struct type *type; char *type_name; + enum demangle_component_type demangled_type; - if (demangled->type == DEMANGLE_COMPONENT_POINTER - || demangled->type == DEMANGLE_COMPONENT_REFERENCE - || demangled->type == DEMANGLE_COMPONENT_CONST - || demangled->type == DEMANGLE_COMPONENT_VOLATILE) + /* Save the type: typy_lookup_type() may (indirectly) overwrite + memory pointed by demanged. */ + demangled_type = demangled->type; + + if (demangled_type == DEMANGLE_COMPONENT_POINTER + || demangled_type == DEMANGLE_COMPONENT_REFERENCE + || demangled_type == DEMANGLE_COMPONENT_CONST + || demangled_type == DEMANGLE_COMPONENT_VOLATILE) { type = typy_lookup_type (demangled->u.s_binary.left, block); if (! type) return NULL; - switch (demangled->type) + switch (demangled_type) { case DEMANGLE_COMPONENT_REFERENCE: return lookup_reference_type (type); hooks/post-receive -- Repository for Project Archer.
next reply other threads:[~2008-11-08 0:41 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-11-08 0:41 ppluzhnikov [this message] -- strict thread matches above, loose matches on Subject: below -- 2008-11-07 21:07 ppluzhnikov 2008-11-07 18:03 ppluzhnikov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20081108004147.6197.qmail@sourceware.org \ --to=ppluzhnikov@sourceware.org \ --cc=archer-commits@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).