bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

xmalloc error involving functrace, int trap and ps4


From: Wiley Young
Subject: xmalloc error involving functrace, int trap and ps4
Date: Sat, 24 Jun 2023 23:18:30 -0700

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -O2 -flto=auto -ffat-lto-objects -fexceptions -g
-grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
uname output: Linux localhost-live 6.2.9-300.fc38.x86_64 #1 SMP
PREEMPT_DYNAMIC Thu Mar 30 22:32:58 UTC 2023 x86_64 GNU/Linux
Machine Type: x86_64-redhat-linux-gnu

Bash Version: 5.2
Patch Level: 15
Release Status: release

Hello,
  A strange error. I don't know what it means exactly, but I'm fairly
positive I don't have 18 exabytes on this computer...?
  Thank you,
Wiley

Repeat-By:
  ...running ./findscan-debug which sources ./gardning-debug. Press enter
once at the DEBUG prompt, and at the next prompt press Ctrl-C. Commenting
out `set -T` or the INT trap will hide the bug again.



+ set -T
+ source /home/liveuser/xmal/gardning-debug_7.bash
++ PS4='\e[0;104m+ At:[$( printf "%2d" ${#BASH_SOURCE[@]} )]$( cut -c -8
<<< ${BASH_SOURCE[0]##*/} )($( printf "%4d" ${LINENO} )) \e[m > \e[0;93m'
+ At:[ 2]gardning(  16)  > trap _trp_int INT
+ At:[ 2]gardning(  22)  > trap _dbg_pmt DEBUG
+ At:[ 2]gardning(  24)  > _dbg_pmt
+ At:[ 3]gardning(  20)  > read -rp '+ [read]()...  : 317222  ...?'
+ [read]()...  : 317222  ...?
+ [read]()...  printf "%2d" ${#BASH_SOURCE[@]}
 ...?^C/home/liveuser/xmal/gardning-debug_7.bash: interrupt trap: line 2:
unexpected EOF while looking for matching `)'
/home/liveuser/xmal/gardning-debug_7.bash: xmalloc: cannot allocate
18446744073709551611 bytes
[liveuser@localhost-live xmal]$ vim
./xmalloc_xtrace-logs/xmalloc_cannot_allocate_29



#!/bin/bash
# findscan-debug
set -x
set -T
source /home/liveuser/xmal/gardning-debug_7.bash



# gardning-debug
# shellcheck shell=bash

#declare -n nBL=BASH_LINENO nBS=BASH_SOURCE nF=FUNCNAME nL=LINENO
#PS4='\e[0;104m+ At:[$( printf "%2d" ${#nBS[@]} )]$( : 21594 )$( cut -c -8
<<< ${nBS[0]##*/} )($( printf "%4d" ${nL} )) In:<$( printf "%-8s"
${nF[0]:-""})> Fr:[$( printf "%2d" $(( ${#nBS[@]} - 1 )) )]$( cut -c -8 <<<
${nBS[1]##*/} )($( printf "%4d" ${nBL[0]} )) \e[m > \e[0;93m'

PS4='\e[0;104m+ At:[$( printf "%2d" ${#BASH_SOURCE[@]} )]$( cut -c -8 <<<
${BASH_SOURCE[0]##*/} )($( printf "%4d" ${LINENO} )) \e[m > \e[0;93m'

function _trp_int {
  trap - DEBUG INT
  kill -s INT "$$"
}
trap _trp_int INT

function _dbg_pmt {
  #read -rp "+ [read]${BASH_SOURCE[1]##*/}(${LINENO[0]})...
 ${BASH_COMMAND}  ...?"
  read -rp "+ [read]${nBS[1]##*/}(${nBL[0]})...  ${BASH_COMMAND}  ...?"
}
trap _dbg_pmt DEBUG

: 317222


reply via email to

[Prev in Thread] Current Thread [Next in Thread]