[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Segmentation fault in evalerror when xtrace and PS4='$[T[$]]'
From: |
Eduardo Bustamante |
Subject: |
Segmentation fault in evalerror when xtrace and PS4='$[T[$]]' |
Date: |
Thu, 4 May 2017 01:38:46 -0500 |
(gdb) r
Starting program: /home/dualbus/src/gnu/bash/bash
bash-4.4$ PS4='$[T[$]]'; set -x
bash-4.4$ :
bash: $: syntax error: operand expected (error token is "$")
Program received signal SIGSEGV, Segmentation fault.
0x00005555555b15ce in evalerror (msg=0x55555565aa95 "syntax error in
expression") at expr.c:1459
1459 for (t = expression; whitespace (*t); t++)
(gdb) bt
#0 0x00005555555b15ce in evalerror (msg=0x55555565aa95 "syntax error
in expression") at expr.c:1459
#1 0x00005555555afbf7 in subexpr (expr=0x5555558b6c10 "T[$]") at expr.c:443
#2 0x00005555555afa70 in evalexp (expr=0x5555558b6c10 "T[$]",
flags=1, validp=0x7fffffffcd90) at expr.c:405
#3 0x00005555555cdb06 in param_expand (string=0x555555923160
"$[T[$]]", sindex=0x7fffffffce88, quoted=1, expanded_something=0x0,
contains_dollar_at=0x7fffffffce7c,
quoted_dollar_at_p=0x7fffffffce84, had_quoted_null_p=0x7fffffffce80,
pflags=0) at subst.c:9159
#4 0x00005555555cebee in expand_word_internal (word=0x7fffffffcf90,
quoted=1, isexp=0, contains_dollar_at=0x0,
expanded_something=0x0) at subst.c:9655
#5 0x00005555555c25fa in expand_prompt_string (string=0x5555558b6b40
"$[T[$]]", quoted=1, wflags=0) at subst.c:3785
#6 0x00005555555922db in decode_prompt_string (string=0x555555940a68
"'") at ./parse.y:5954
#7 0x00005555555972cc in indirection_level_string () at print_cmd.c:436
#8 0x0000555555597661 in xtrace_print_word_list (list=0x5555558b8140,
xtflags=1) at print_cmd.c:531
#9 0x00005555555a144e in execute_simple_command
(simple_command=0x555555922920, pipe_in=-1, pipe_out=-1, async=0,
fds_to_close=0x555555922940) at execute_cmd.c:4252
#10 0x000055555559b2f0 in execute_command_internal
(command=0x5555558c0e10, asynchronous=0, pipe_in=-1, pipe_out=-1,
fds_to_close=0x555555922940) at execute_cmd.c:811
#11 0x000055555559a84c in execute_command (command=0x5555558c0e10) at
execute_cmd.c:393
#12 0x00005555555849ca in reader_loop () at eval.c:172
#13 0x0000555555582617 in main (argc=1, argv=0x7fffffffe498,
env=0x7fffffffe4a8) at shell.c:794
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Segmentation fault in evalerror when xtrace and PS4='$[T[$]]',
Eduardo Bustamante <=