Configure tsocks with a simple heuristic.
Consider the proxy has to be in a 'local' network. It means it is directly
reachable by the local machine, even if the local machine has to hop through
one or more gates to reach the proxy (often the case in enterprise networks
where class A 10.0.0.0/8 is in fact sub-divided into smaller networks, each
one of them in a different location, eg. 10.1.0.0/16 in a place, while
10.2.0.0/16 would be on the other side of the world). Not being in the same
subnet does not mean the proxy is not available.
So we will build a mask with at most high bits set, which defines a network
that has both the local machine and the proxy. Because a machine may have
more than one interface, build a mask for each of them, removing 127.0.0.1
which is added automagically by tsocks, and removing duplicate masks.
If all of this does not work, then it means the local machine can NOT in fact
reach the proxy, which in turn means the user mis-configured something (most
probably a typo...).
/trunk/scripts/crosstool.sh | 61 52 9 0 +++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 52 insertions(+), 9 deletions(-)
1 Date: 18 May 2005 22:47:59 -0000
2 Message-ID: <20050518224759.7352.qmail@sourceware.org>
3 From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
5 References: <20050407215701.20815.dank@kegel.com>
6 Reply-To: gcc-bugzilla@gcc.gnu.org
7 Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
10 ------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:47 -------
11 Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
14 > ------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:22 -------
15 > Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
17 > coverage_checksum_string already knows a bit about ignoring random seed
18 > produced mess. It looks like this needs to be extended somehow to
19 > handle namespaces too...
21 This seems to solve the missmatch. Would it be possible to test it on
22 bigger testcase and if it works distile a testcase that don't use
23 file IO so it is more suitable for gcc regtesting?
26 ===================================================================
27 RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
28 retrieving revision 1.6.2.12.2.12
29 diff -c -3 -p -r1.6.2.12.2.12 coverage.c
30 *** gcc-old/gcc/coverage.c 18 May 2005 07:37:31 -0000 1.6.2.12.2.12
31 --- gcc/gcc/coverage.c 18 May 2005 22:45:36 -0000
32 *************** coverage_checksum_string (unsigned chksu
34 as the checksums are used only for sanity checking. */
35 for (i = 0; string[i]; i++)
37 if (!strncmp (string + i, "_GLOBAL__", 9))
38 ! for (i = i + 9; string[i]; i++)
45 ! for (y = 1; y < 9; y++)
46 ! if (!(string[i + y] >= '0' && string[i + y] <= '9')
47 ! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
49 ! if (y != 9 || string[i + 9] != '_')
51 ! for (y = 10; y < 18; y++)
52 ! if (!(string[i + y] >= '0' && string[i + y] <= '9')
53 ! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
57 ! scan = sscanf (string + i + 10, "%X", &seed);
59 ! if (seed != crc32_string (0, flag_random_seed))
61 ! string = dup = xstrdup (string);
62 ! for (y = 10; y < 18; y++)
70 as the checksums are used only for sanity checking. */
71 for (i = 0; string[i]; i++)
74 + if (!strncmp (string + i, "_GLOBAL__N_", 11))
76 if (!strncmp (string + i, "_GLOBAL__", 9))
79 ! /* C++ namespaces do have scheme:
80 ! _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
81 ! since filename might contain extra underscores there seems
82 ! to be no better chance then walk all possible offsets looking
85 ! for (;string[offset]; offset++)
86 ! for (i = i + offset; string[i]; i++)
91 ! for (y = 1; y < 9; y++)
92 ! if (!(string[i + y] >= '0' && string[i + y] <= '9')
93 ! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
95 ! if (y != 9 || string[i + 9] != '_')
97 ! for (y = 10; y < 18; y++)
98 ! if (!(string[i + y] >= '0' && string[i + y] <= '9')
99 ! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
104 ! string = dup = xstrdup (string);
105 ! for (y = 10; y < 18; y++)
116 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
118 ------- You are receiving this mail because: -------
119 You reported the bug, or are watching the reporter.