Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 66358 | Differences between
and this patch

Collapse All | Expand All

(-)glibc-2.3.2.orig/debug/catchsegv.sh (-5 / +3 lines)
Lines 49-57 Link Here
49
  esac
49
  esac
50
fi
50
fi
51
51
52
segv_output=`basename "$prog"`.segv.$$
52
segv_output=`mktemp \`basename "$prog".segv.XXXXXX\`` || exit 1
53
# Make sure this output file does not exist.
54
rm -f "$segv_output"
55
53
56
# Redirect stderr to avoid termination message from shell.
54
# Redirect stderr to avoid termination message from shell.
57
(exec 3>&2 2>/dev/null
55
(exec 3>&2 2>/dev/null
Lines 64-70 Link Here
64
# Check for output.  Even if the program terminated correctly it might
62
# Check for output.  Even if the program terminated correctly it might
65
# be that a minor process (clone) failed.  Therefore we do not check the
63
# be that a minor process (clone) failed.  Therefore we do not check the
66
# exit code.
64
# exit code.
67
if test -f "$segv_output"; then
65
if test -s "$segv_output"; then
68
  # The program caught a signal.  The output is in the file with the
66
  # The program caught a signal.  The output is in the file with the
69
  # name we have in SEGFAULT_OUTPUT_NAME.  In the output the names of
67
  # name we have in SEGFAULT_OUTPUT_NAME.  In the output the names of
70
  # functions in shared objects are available, but names in the static
68
  # functions in shared objects are available, but names in the static
Lines 101-107 Link Here
101
	    ;;
99
	    ;;
102
     esac
100
     esac
103
   done)
101
   done)
104
   rm -f "$segv_output"
105
fi
102
fi
103
rm -f "$segv_output"
106
104
107
exit $exval
105
exit $exval
(-)glibc-2.3.2.orig/glibcbug.in (-31 / +23 lines)
Lines 22-39 Link Here
22
BUILD_BOUNDED="@bounded@"
22
BUILD_BOUNDED="@bounded@"
23
BUILD_STATIC_NSS="@static_nss@"
23
BUILD_STATIC_NSS="@static_nss@"
24
24
25
TEMP=`mktemp -q ${TMPDIR-/tmp}/glibcbugXXXXXX 2>/dev/null`
25
TEMP="`mktemp -t glibcbugXXXXXXXXXX`" || exit 1
26
if test $? -ne 0; then
26
TEMPx="`mktemp -t glibcbugXXXXXXXXXX`" || {
27
  TEMP=${TMPDIR-/tmp}/glibcbug.$$
27
  rm -f "$TEMP"
28
  echo > $TEMP
28
  exit 1
29
  chmod 600 $TEMP
29
}
30
fi
30
31
TEMPx=`mktemp -q ${TMPDIR-/tmp}/glibcbugXXXXXX 2>/dev/null`
31
trap 'rm -f "$TEMP" "$TEMPx"; exit 1' HUP INT PIPE TERM
32
if test $? -ne 0; then
32
trap 'rm -f "$TEMP" "$TEMPx"' EXIT
33
  TEMPx=${TMPDIR-/tmp}/glibcbug.$$.x
34
  echo > $TEMPx
35
  chmod 600 $TEMPx
36
fi
37
33
38
BUGGLIBC="glibc-bug-reports-${RELEASE}@gnu.org"
34
BUGGLIBC="glibc-bug-reports-${RELEASE}@gnu.org"
39
BUGADDR=${1-$BUGGLIBC}
35
BUGADDR=${1-$BUGGLIBC}
Lines 42-51 Link Here
42
38
43
: ${USER=${LOGNAME-`whoami`}}
39
: ${USER=${LOGNAME-`whoami`}}
44
40
45
trap 'rm -f $TEMP $TEMPx; exit 1' 1 2 3 13 15
46
trap 'rm -f $TEMP $TEMPx' 0
47
48
49
# How to read the passwd database.
41
# How to read the passwd database.
50
PASSWD="cat /etc/passwd"
42
PASSWD="cat /etc/passwd"
51
43
Lines 72-79 Link Here
72
else
64
else
73
  # Must use temp file due to incompatibilities in quoting behavior
65
  # Must use temp file due to incompatibilities in quoting behavior
74
  # and to protect shell metacharacters in the expansion of $LOGNAME
66
  # and to protect shell metacharacters in the expansion of $LOGNAME
75
  $PASSWD | grep "^$LOGNAME:" | awk -F: '{print $5}' | sed -e 's/,.*//' > $TEMP
67
  $PASSWD | grep "^$LOGNAME:" | awk -F: '{print $5}' | sed -e 's/,.*//' > "$TEMP"
76
  ORIGINATOR="`cat $TEMP`"
68
  ORIGINATOR="`cat "$TEMP"`"
77
fi
69
fi
78
70
79
if [ -n "$ORGANIZATION" ]; then
71
if [ -n "$ORGANIZATION" ]; then
Lines 123-129 Link Here
123
FIX_C='<how to correct or work around the problem, if known (multiple lines)>'
115
FIX_C='<how to correct or work around the problem, if known (multiple lines)>'
124
116
125
117
126
cat > $TEMP <<EOF
118
cat > "$TEMP" <<EOF
127
SEND-PR: -*- send-pr -*-
119
SEND-PR: -*- send-pr -*-
128
SEND-PR: Lines starting with \`SEND-PR' will be removed automatically, as
120
SEND-PR: Lines starting with \`SEND-PR' will be removed automatically, as
129
SEND-PR: will all comments (text enclosed in \`<' and \`>').
121
SEND-PR: will all comments (text enclosed in \`<' and \`>').
Lines 171-182 Link Here
171
	$FIX_C
163
	$FIX_C
172
EOF
164
EOF
173
165
174
chmod u+w $TEMP
166
chmod u+w "$TEMP"
175
cp $TEMP $TEMPx
167
cp "$TEMP" "$TEMPx"
176
168
177
eval $EDIT $TEMP
169
eval $EDIT "$TEMP"
178
170
179
if cmp -s $TEMP $TEMPx; then
171
if cmp -s "$TEMP" "$TEMPx"; then
180
	echo "File not changed, no bug report submitted."
172
	echo "File not changed, no bug report submitted."
181
	exit 1
173
	exit 1
182
fi
174
fi
Lines 205-211 Link Here
205
  # 1) Severity
197
  # 1) Severity
206
  #
198
  #
207
  PATTERN=">Severity:"
199
  PATTERN=">Severity:"
208
  SEVERITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
200
  SEVERITY=`eval sed -n -e "\"$SED_CMD\"" "$TEMP"`
209
  case "$SEVERITY" in
201
  case "$SEVERITY" in
210
    ""|non-critical|serious|critical) CNT=`expr $CNT + 1` ;;
202
    ""|non-critical|serious|critical) CNT=`expr $CNT + 1` ;;
211
    *)  echo "$COMMAND: \`$SEVERITY' is not a valid value for \`Severity'."
203
    *)  echo "$COMMAND: \`$SEVERITY' is not a valid value for \`Severity'."
Lines 214-220 Link Here
214
  # 2) Priority
206
  # 2) Priority
215
  #
207
  #
216
  PATTERN=">Priority:"
208
  PATTERN=">Priority:"
217
  PRIORITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
209
  PRIORITY=`eval sed -n -e "\"$SED_CMD\"" "$TEMP"`
218
  case "$PRIORITY" in
210
  case "$PRIORITY" in
219
    ""|low|medium|high) CNT=`expr $CNT + 1` ;;
211
    ""|low|medium|high) CNT=`expr $CNT + 1` ;;
220
    *)  echo "$COMMAND: \`$PRIORITY' is not a valid value for \`Priority'."
212
    *)  echo "$COMMAND: \`$PRIORITY' is not a valid value for \`Priority'."
Lines 223-229 Link Here
223
  # 3) Class
215
  # 3) Class
224
  #
216
  #
225
  PATTERN=">Class:"
217
  PATTERN=">Class:"
226
  CLASS=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
218
  CLASS=`eval sed -n -e "\"$SED_CMD\"" "$TEMP"`
227
  case "$CLASS" in
219
  case "$CLASS" in
228
    ""|sw-bug|doc-bug|change-request|support) CNT=`expr $CNT + 1` ;;
220
    ""|sw-bug|doc-bug|change-request|support) CNT=`expr $CNT + 1` ;;
229
    *)  echo "$COMMAND: \`$CLASS' is not a valid value for \`Class'."
221
    *)  echo "$COMMAND: \`$CLASS' is not a valid value for \`Class'."
Lines 238-248 Link Here
238
    case "$input" in
230
    case "$input" in
239
      a*)
231
      a*)
240
	echo "$COMMAND: problem report saved in $HOME/dead.glibcbug."
232
	echo "$COMMAND: problem report saved in $HOME/dead.glibcbug."
241
	cat $TEMP >> $HOME/dead.glibcbug
233
	cat "$TEMP" >> $HOME/dead.glibcbug
242
        xs=1; exit
234
        xs=1; exit
243
        ;;
235
        ;;
244
      e*)
236
      e*)
245
        eval $EDIT $TEMP
237
        eval $EDIT "$TEMP"
246
        continue 2
238
        continue 2
247
        ;;
239
        ;;
248
      s*)
240
      s*)
Lines 269-283 Link Here
269
/^>Description:/,/^>[A-Za-z-]*:/s;$DESCRIPTION_C;;
261
/^>Description:/,/^>[A-Za-z-]*:/s;$DESCRIPTION_C;;
270
/^>How-To-Repeat:/,/^>[A-Za-z-]*:/s;$HOW_TO_REPEAT_C;;
262
/^>How-To-Repeat:/,/^>[A-Za-z-]*:/s;$HOW_TO_REPEAT_C;;
271
/^>Fix:/,/^>[A-Za-z-]*:/s;$FIX_C;;
263
/^>Fix:/,/^>[A-Za-z-]*:/s;$FIX_C;;
272
" $TEMP > $TEMPx
264
" "$TEMP" > "$TEMPx"
273
265
274
if $MAIL_AGENT < $TEMPx; then
266
if $MAIL_AGENT < "$TEMPx"; then
275
  echo "$COMMAND: problem report sent"
267
  echo "$COMMAND: problem report sent"
276
  xs=0; exit
268
  xs=0; exit
277
else
269
else
278
  echo "$COMMAND: mysterious mail failure, report not sent."
270
  echo "$COMMAND: mysterious mail failure, report not sent."
279
  echo "$COMMAND: problem report saved in $HOME/dead.glibcbug."
271
  echo "$COMMAND: problem report saved in $HOME/dead.glibcbug."
280
  cat $TEMP >> $HOME/dead.glibcbug
272
  cat "$TEMP" >> $HOME/dead.glibcbug
281
fi
273
fi
282
274
283
exit 0
275
exit 0
(-)glibc-2.3.2.orig/libio/oldtmpfile.c (-1 / +1 lines)
Lines 35-41 Link Here
35
  int fd;
35
  int fd;
36
  FILE *f;
36
  FILE *f;
37
37
38
  if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 0))
38
  if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 1))
39
    return NULL;
39
    return NULL;
40
  fd = __gen_tempname (buf, __GT_FILE);
40
  fd = __gen_tempname (buf, __GT_FILE);
41
  if (fd < 0)
41
  if (fd < 0)
(-)glibc-2.3.2.orig/sysdeps/generic/tmpfile.c (-1 / +1 lines)
Lines 43-49 Link Here
43
  int fd;
43
  int fd;
44
  FILE *f;
44
  FILE *f;
45
45
46
  if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 0))
46
  if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 1))
47
    return NULL;
47
    return NULL;
48
  fd = __gen_tempname (buf, GEN_THIS);
48
  fd = __gen_tempname (buf, GEN_THIS);
49
  if (fd < 0)
49
  if (fd < 0)

Return to bug 66358