From: Tom Tromey <tom@tromey.com>
To: Aditya Vidyadhar Kamath <akamath996@gmail.com>
Cc: ulrich.weigand@de.ibm.com, simon.marchi@polymtl.ca,
tom@tromey.com, gdb-patches@sourceware.org,
Aditya.Kamath1@ibm.com, sangamesh.swamy@in.ibm.com
Subject: Re: [PATCH v2] Fix crash when target-wide-charset doesn't match wchar_t size
Date: Fri, 23 Oct 2026 12:36:26 -0600 [thread overview]
Message-ID: <87cxt0qn6d.fsf@tromey.com> (raw)
In-Reply-To: <20261021090155.28129-2-akamath996@gmail.com> (Aditya Vidyadhar Kamath's message of "Wed, 21 Oct 2026 14:31:56 +0530")
>>>>> Aditya Vidyadhar Kamath <akamath996@gmail.com> writes:
> Then debug with GDB and we get the crash
> (gdb) b wchar.c:44
> (gdb) run
> (gdb) set target-wide-charset UTF-16
> (gdb) print single
> Fatal signal: Segmentation fault
> ----- Backtrace -----
Could you show the backtrace? I don't know if I can reproduce this but
I am also curious to know how it happens.
> +static int
> +wide_charset_width (const char *name)
> +{
> + if (strncasecmp (name, "UTF-16", 6) == 0
> + || strncasecmp (name, "UCS-2", 5) == 0)
> + return 2;
> + if (strncasecmp (name, "UTF-32", 6) == 0
> + || strncasecmp (name, "UCS-4", 5) == 0)
> + return 4;
> + return 0;
I somewhat suspect we should have a different fix targeting the crash
itself. But I'm not totally sure.
Tom
next prev parent reply other threads:[~2026-10-23 18:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 9:01 Aditya Vidyadhar Kamath
2026-10-23 18:36 ` Tom Tromey [this message]
2026-10-23 18:41 ` Aditya Kamath
2026-10-23 19:31 ` Tom Tromey
2026-10-27 11:18 ` Aditya Kamath
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=87cxt0qn6d.fsf@tromey.com \
--to=tom@tromey.com \
--cc=Aditya.Kamath1@ibm.com \
--cc=akamath996@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=sangamesh.swamy@in.ibm.com \
--cc=simon.marchi@polymtl.ca \
--cc=ulrich.weigand@de.ibm.com \
/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: link
Be 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