|
From: <sv...@va...> - 2014-02-19 11:16:18
|
Author: florian
Date: Wed Feb 19 11:16:00 2014
New Revision: 13816
Log:
Fix BZ #327212. Check for absolute path name at the end of
expand_file_name -- not at the beginning.
Modified:
trunk/NEWS
trunk/coregrind/m_options.c
trunk/docs/internals/3_9_BUGSTATUS.txt
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Feb 19 11:16:00 2014
@@ -39,6 +39,7 @@
326444 Cavium MIPS Octeon Specific Load Indexed Instructions
326462 Refactor vgdb to isolate invoker stuff into separate module
326983 Clear direction flag after tests on amd64.
+327212 Do not prepend the current directory to absolute path names.
327238 Callgrind Assertion 'passed <= last_bb->cjmp_count' failed
327284 s390x: Fix translation of the risbg instruction
327837 dwz compressed alternate .debug_info and .debug_str not read correctly
Modified: trunk/coregrind/m_options.c
==============================================================================
--- trunk/coregrind/m_options.c (original)
+++ trunk/coregrind/m_options.c Wed Feb 19 11:16:00 2014
@@ -168,18 +168,8 @@
goto bad;
}
- // If 'format' starts with a '/', do not prefix with startup dir.
- if (format[0] != '/') {
- j += VG_(strlen)(base_dir);
- }
-
- // The 10 is slop, it should be enough in most cases.
- len = j + VG_(strlen)(format) + 10;
+ len = VG_(strlen)(format) + 1;
out = VG_(malloc)( "options.efn.1", len );
- if (format[0] != '/') {
- VG_(strcpy)(out, base_dir);
- out[j++] = '/';
- }
#define ENSURE_THIS_MUCH_SPACE(x) \
if (j + x >= len) { \
@@ -261,6 +251,18 @@
ENSURE_THIS_MUCH_SPACE(1);
out[j++] = 0;
+ // If 'out' is not an absolute path name, prefix it with the startup dir.
+ if (out[0] != '/') {
+ len = VG_(strlen)(base_dir) + 1 + VG_(strlen)(out) + 1;
+
+ HChar *absout = VG_(malloc)("options.efn.4", len);
+ VG_(strcpy)(absout, base_dir);
+ VG_(strcat)(absout, "/");
+ VG_(strcat)(absout, out);
+ VG_(free)(out);
+ out = absout;
+ }
+
return out;
bad: {
Modified: trunk/docs/internals/3_9_BUGSTATUS.txt
==============================================================================
--- trunk/docs/internals/3_9_BUGSTATUS.txt (original)
+++ trunk/docs/internals/3_9_BUGSTATUS.txt Wed Feb 19 11:16:00 2014
@@ -38,7 +38,6 @@
327138 valgrind.h __VALGRIND_MINOR__ says 8, in 3.9.0 tarball
327151 valgrind appears to stop compiling when it enters the drd directory
327155 Valgrind compilation hang on MIPS
-327212 expand_file_name prepends current directory when expansion starts with /
327223 Support for Cavium MIPS Octeon Atomic and Count Instructions
327238 assertion failure in Callgrind: bbcc.c:585 (vgCallgrind_setup_bbcc): Assertion 'passed <= last_bb->cjmp_count' failed
327284 s390x VEX miscompilation of -march=z10 binary
|