* [BUG ?] Failed to rebuild Cygwin
@ 2013-07-31 10:14 Pavel Fedin
2013-07-31 10:27 ` Corinna Vinschen
2013-07-31 10:47 ` Corinna Vinschen
0 siblings, 2 replies; 13+ messages in thread
From: Pavel Fedin @ 2013-07-31 10:14 UTC (permalink / raw)
To: cygwin
Hello!
I have occasionally found a little problem in path check code. Attempt to
reference thing like '/..' fails, however at least under Linux this resolves
to root, and you can actually attempt to go past-root as many times as you
want, e. g. '/../../../..'. The bug was occasionally revealed by 'make' test
suite.
I wanted to fix it, but cannot rebuild Cygwin DLL. The build ends up in:
--- cut ---
x86_64-w64-mingw32-g++ -o strace.exe strace.o path.o -L/usr/lib/w32api
-static -lntdll
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/crt2.o: In function
`__tmainCRTStartup':
/usr/src/debug/mingw64-x86_64-runtime-3.0b_svn5935-1/crt/crtexe.c:285:
undefined reference to `_set_invalid_parameter_handler'
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libmingwex.a(lib64_libming
wex_a-mingw_pformat.o): In function `__pformat_exponent_digits':
/usr/src/debug/mingw64-x86_64-runtime-3.0b_svn5935-1/stdio/mingw_pformat.c:1
76: undefined reference to `_get_output_format'
collect2: error: ld returned 1 exit status
Makefile:143: recipe for target `cygwin-console-helper.exe' failed
make[3]: *** [cygwin-console-helper.exe] Error 1
--- cut ---
Likely some MinGW CRT bug ?
P.S. I suggest that the way to fix the described path check bug is to undo
your small optimization and move back setting check_parent flag to:
--- cut ---
/* Strip runs of /'s. */
if (!isslash (*src))
{
*tail++ = *src++;
check_parent = true;
}
--- cut ---
The idea behind this is that the check will take place only if we have
actually got something to check (at least one non-slash character). In case
of '/..' the first 'isslash(*src)' returns TRUE, consequently the loop will
not run at all.
An alternative is to add a check against 'dst' being empty around the
actual check:
--- cut ---
path_conv head (dst);
if (!head.isdir())
return ENOENT;
--- cut ---
A test case for this problem is being able to execute 'ls /../../..' and
get listing of '/'.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG ?] Failed to rebuild Cygwin
2013-07-31 10:14 [BUG ?] Failed to rebuild Cygwin Pavel Fedin
@ 2013-07-31 10:27 ` Corinna Vinschen
2013-07-31 10:28 ` JonY
2013-07-31 10:47 ` Corinna Vinschen
1 sibling, 1 reply; 13+ messages in thread
From: Corinna Vinschen @ 2013-07-31 10:27 UTC (permalink / raw)
To: cygwin; +Cc: JonY
On Jul 31 12:55, Pavel Fedin wrote:
> Hello!
>
> I have occasionally found a little problem in path check code. Attempt to
> reference thing like '/..' fails, however at least under Linux this resolves
> to root, and you can actually attempt to go past-root as many times as you
> want, e. g. '/../../../..'. The bug was occasionally revealed by 'make' test
> suite.
> I wanted to fix it, but cannot rebuild Cygwin DLL. The build ends up in:
> --- cut ---
> x86_64-w64-mingw32-g++ -o strace.exe strace.o path.o -L/usr/lib/w32api
> -static -lntdll
> /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/crt2.o: In function
> `__tmainCRTStartup':
> /usr/src/debug/mingw64-x86_64-runtime-3.0b_svn5935-1/crt/crtexe.c:285:
> undefined reference to `_set_invalid_parameter_handler'
> /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libmingwex.a(lib64_libming
> wex_a-mingw_pformat.o): In function `__pformat_exponent_digits':
> /usr/src/debug/mingw64-x86_64-runtime-3.0b_svn5935-1/stdio/mingw_pformat.c:1
> 76: undefined reference to `_get_output_format'
> collect2: error: ld returned 1 exit status
> Makefile:143: recipe for target `cygwin-console-helper.exe' failed
> make[3]: *** [cygwin-console-helper.exe] Error 1
> --- cut ---
> Likely some MinGW CRT bug ?
This also occurs on Fedora right now.
AFAICS, the culprit is that the latest Cygwin w32api package doesn't
match the files from mingw-crt for some reason.
The build uses -L/usr/lib/w32api (-L/usr/i686-pc-cygwin/lib/w32api when
cross building on Fedora), so the libs are taken from the w32api-runtime
package. However, the compiler uses the default crt file
/usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/crt2.o which is provided
by the mingw-crt package.
This is a bug in Cygwin's Makefile since you should never use the w32api
stuff for mingw executables, only for Cygwin executables, but still...
JonY, do you have an idea why the mingw-crt differs that much from the
w32api stuff that the above error occurs?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG ?] Failed to rebuild Cygwin
2013-07-31 10:27 ` Corinna Vinschen
@ 2013-07-31 10:28 ` JonY
2013-07-31 11:23 ` Corinna Vinschen
0 siblings, 1 reply; 13+ messages in thread
From: JonY @ 2013-07-31 10:28 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 2431 bytes --]
On 7/31/2013 17:59, Corinna Vinschen wrote:
> On Jul 31 12:55, Pavel Fedin wrote:
>> Hello!
>>
>> I have occasionally found a little problem in path check code. Attempt to
>> reference thing like '/..' fails, however at least under Linux this resolves
>> to root, and you can actually attempt to go past-root as many times as you
>> want, e. g. '/../../../..'. The bug was occasionally revealed by 'make' test
>> suite.
>> I wanted to fix it, but cannot rebuild Cygwin DLL. The build ends up in:
>> --- cut ---
>> x86_64-w64-mingw32-g++ -o strace.exe strace.o path.o -L/usr/lib/w32api
>> -static -lntdll
>> /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/crt2.o: In function
>> `__tmainCRTStartup':
>> /usr/src/debug/mingw64-x86_64-runtime-3.0b_svn5935-1/crt/crtexe.c:285:
>> undefined reference to `_set_invalid_parameter_handler'
>> /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libmingwex.a(lib64_libming
>> wex_a-mingw_pformat.o): In function `__pformat_exponent_digits':
>> /usr/src/debug/mingw64-x86_64-runtime-3.0b_svn5935-1/stdio/mingw_pformat.c:1
>> 76: undefined reference to `_get_output_format'
>> collect2: error: ld returned 1 exit status
>> Makefile:143: recipe for target `cygwin-console-helper.exe' failed
>> make[3]: *** [cygwin-console-helper.exe] Error 1
>> --- cut ---
>> Likely some MinGW CRT bug ?
>
> This also occurs on Fedora right now.
>
> AFAICS, the culprit is that the latest Cygwin w32api package doesn't
> match the files from mingw-crt for some reason.
>
> The build uses -L/usr/lib/w32api (-L/usr/i686-pc-cygwin/lib/w32api when
> cross building on Fedora), so the libs are taken from the w32api-runtime
> package. However, the compiler uses the default crt file
> /usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/crt2.o which is provided
> by the mingw-crt package.
>
> This is a bug in Cygwin's Makefile since you should never use the w32api
> stuff for mingw executables, only for Cygwin executables, but still...
>
> JonY, do you have an idea why the mingw-crt differs that much from the
> w32api stuff that the above error occurs?
>
Likely, because _set_invalid_parameter_handler was a stub in mingwex
that loads msvcrt.dll, it was disabled as a quickfix, as it was using
mingw-w64 stdlib.h directly. I did not think Cygwin win32api might need it.
The build should be fixed on trunk, I will roll out a new release soon.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 834 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG ?] Failed to rebuild Cygwin
2013-07-31 10:14 [BUG ?] Failed to rebuild Cygwin Pavel Fedin
2013-07-31 10:27 ` Corinna Vinschen
@ 2013-07-31 10:47 ` Corinna Vinschen
2013-07-31 12:06 ` Pavel Fedin
1 sibling, 1 reply; 13+ messages in thread
From: Corinna Vinschen @ 2013-07-31 10:47 UTC (permalink / raw)
To: cygwin
On Jul 31 12:55, Pavel Fedin wrote:
> Hello!
>
> I have occasionally found a little problem in path check code. Attempt to
> reference thing like '/..' fails, however at least under Linux this resolves
> to root, and you can actually attempt to go past-root as many times as you
> want, e. g. '/../../../..'. The bug was occasionally revealed by 'make' test
> suite.
> [...]
> P.S. I suggest that the way to fix the described path check bug is to undo
> your small optimization and move back setting check_parent flag to:
> --- cut ---
> /* Strip runs of /'s. */
> if (!isslash (*src))
> {
> *tail++ = *src++;
> check_parent = true;
> }
> --- cut ---
This works, but what bugs me a bit is setting a variable to true for
each non-slash character. That happens a lot of time.
> The idea behind this is that the check will take place only if we have
> actually got something to check (at least one non-slash character). In case
> of '/..' the first 'isslash(*src)' returns TRUE, consequently the loop will
> not run at all.
> An alternative is to add a check against 'dst' being empty around the
> actual check:
> --- cut ---
> path_conv head (dst);
> if (!head.isdir())
> return ENOENT;
> --- cut ---
I applied a patch which skips testing / or // when a /.. or //.. has
been encountered. Can you please give it a try?
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG ?] Failed to rebuild Cygwin
2013-07-31 10:28 ` JonY
@ 2013-07-31 11:23 ` Corinna Vinschen
2013-07-31 11:32 ` Corinna Vinschen
0 siblings, 1 reply; 13+ messages in thread
From: Corinna Vinschen @ 2013-07-31 11:23 UTC (permalink / raw)
To: cygwin
On Jul 31 18:13, JonY wrote:
> On 7/31/2013 17:59, Corinna Vinschen wrote:
> > On Jul 31 12:55, Pavel Fedin wrote:
> >> Hello!
> >>
> >> I have occasionally found a little problem in path check code. Attempt to
> >> reference thing like '/..' fails, however at least under Linux this resolves
> >> to root, and you can actually attempt to go past-root as many times as you
> >> want, e. g. '/../../../..'. The bug was occasionally revealed by 'make' test
> >> suite.
> >> I wanted to fix it, but cannot rebuild Cygwin DLL. The build ends up in:
> >> --- cut ---
> >> x86_64-w64-mingw32-g++ -o strace.exe strace.o path.o -L/usr/lib/w32api
> >> -static -lntdll
> >> /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/crt2.o: In function
> >> `__tmainCRTStartup':
> >> /usr/src/debug/mingw64-x86_64-runtime-3.0b_svn5935-1/crt/crtexe.c:285:
> >> undefined reference to `_set_invalid_parameter_handler'
> >> /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libmingwex.a(lib64_libming
> >> wex_a-mingw_pformat.o): In function `__pformat_exponent_digits':
> >> /usr/src/debug/mingw64-x86_64-runtime-3.0b_svn5935-1/stdio/mingw_pformat.c:1
> >> 76: undefined reference to `_get_output_format'
> >> collect2: error: ld returned 1 exit status
> >> Makefile:143: recipe for target `cygwin-console-helper.exe' failed
> >> make[3]: *** [cygwin-console-helper.exe] Error 1
> >> --- cut ---
> >> Likely some MinGW CRT bug ?
> >
> > This also occurs on Fedora right now.
> >
> > AFAICS, the culprit is that the latest Cygwin w32api package doesn't
> > match the files from mingw-crt for some reason.
> >
> > The build uses -L/usr/lib/w32api (-L/usr/i686-pc-cygwin/lib/w32api when
> > cross building on Fedora), so the libs are taken from the w32api-runtime
> > package. However, the compiler uses the default crt file
> > /usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/crt2.o which is provided
> > by the mingw-crt package.
> >
> > This is a bug in Cygwin's Makefile since you should never use the w32api
> > stuff for mingw executables, only for Cygwin executables, but still...
> >
> > JonY, do you have an idea why the mingw-crt differs that much from the
> > w32api stuff that the above error occurs?
> >
>
> Likely, because _set_invalid_parameter_handler was a stub in mingwex
> that loads msvcrt.dll, it was disabled as a quickfix, as it was using
> mingw-w64 stdlib.h directly. I did not think Cygwin win32api might need it.
>
> The build should be fixed on trunk, I will roll out a new release soon.
Cool, thanks!
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG ?] Failed to rebuild Cygwin
2013-07-31 11:23 ` Corinna Vinschen
@ 2013-07-31 11:32 ` Corinna Vinschen
2013-07-31 12:02 ` JonY
0 siblings, 1 reply; 13+ messages in thread
From: Corinna Vinschen @ 2013-07-31 11:32 UTC (permalink / raw)
To: cygwin
On Jul 31 12:28, Corinna Vinschen wrote:
> On Jul 31 18:13, JonY wrote:
> > On 7/31/2013 17:59, Corinna Vinschen wrote:
> > > On Jul 31 12:55, Pavel Fedin wrote:
> > >> /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/crt2.o: In function
> > >> `__tmainCRTStartup':
> > >> /usr/src/debug/mingw64-x86_64-runtime-3.0b_svn5935-1/crt/crtexe.c:285:
> > >> undefined reference to `_set_invalid_parameter_handler'
> > >> /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libmingwex.a(lib64_libming
> > >> wex_a-mingw_pformat.o): In function `__pformat_exponent_digits':
> > >> /usr/src/debug/mingw64-x86_64-runtime-3.0b_svn5935-1/stdio/mingw_pformat.c:1
> > >> 76: undefined reference to `_get_output_format'
> > >> collect2: error: ld returned 1 exit status
> > >> Makefile:143: recipe for target `cygwin-console-helper.exe' failed
> > >> make[3]: *** [cygwin-console-helper.exe] Error 1
> > >> --- cut ---
> > >> Likely some MinGW CRT bug ?
> > >
> > > This also occurs on Fedora right now.
> > >
> > > AFAICS, the culprit is that the latest Cygwin w32api package doesn't
> > > match the files from mingw-crt for some reason.
> > >
> > > The build uses -L/usr/lib/w32api (-L/usr/i686-pc-cygwin/lib/w32api when
> > > cross building on Fedora), so the libs are taken from the w32api-runtime
> > > package. However, the compiler uses the default crt file
> > > /usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/crt2.o which is provided
> > > by the mingw-crt package.
> > >
> > > This is a bug in Cygwin's Makefile since you should never use the w32api
> > > stuff for mingw executables, only for Cygwin executables, but still...
> > >
> > > JonY, do you have an idea why the mingw-crt differs that much from the
> > > w32api stuff that the above error occurs?
> > >
> >
> > Likely, because _set_invalid_parameter_handler was a stub in mingwex
> > that loads msvcrt.dll, it was disabled as a quickfix, as it was using
> > mingw-w64 stdlib.h directly. I did not think Cygwin win32api might need it.
> >
> > The build should be fixed on trunk, I will roll out a new release soon.
>
> Cool, thanks!
Erm... hang on. On second thought, I'm not sure that this is a bug.
The actual bug here was clearly in the Cygwin utils Makefile.
In fact, since w32api should only be used by Cygwin executables, why
should w32api provide libmingwex.a at all? Linking a Cygwin executable
against libmingwex doesn't sound like the right thing to do. Shouldn't
rather libmingwex.a just go from w32api?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG ?] Failed to rebuild Cygwin
2013-07-31 11:32 ` Corinna Vinschen
@ 2013-07-31 12:02 ` JonY
2013-07-31 12:06 ` Corinna Vinschen
0 siblings, 1 reply; 13+ messages in thread
From: JonY @ 2013-07-31 12:02 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 2831 bytes --]
On 7/31/2013 18:47, Corinna Vinschen wrote:
> On Jul 31 12:28, Corinna Vinschen wrote:
>> On Jul 31 18:13, JonY wrote:
>>> On 7/31/2013 17:59, Corinna Vinschen wrote:
>>>> On Jul 31 12:55, Pavel Fedin wrote:
>>>>> /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/crt2.o: In function
>>>>> `__tmainCRTStartup':
>>>>> /usr/src/debug/mingw64-x86_64-runtime-3.0b_svn5935-1/crt/crtexe.c:285:
>>>>> undefined reference to `_set_invalid_parameter_handler'
>>>>> /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libmingwex.a(lib64_libming
>>>>> wex_a-mingw_pformat.o): In function `__pformat_exponent_digits':
>>>>> /usr/src/debug/mingw64-x86_64-runtime-3.0b_svn5935-1/stdio/mingw_pformat.c:1
>>>>> 76: undefined reference to `_get_output_format'
>>>>> collect2: error: ld returned 1 exit status
>>>>> Makefile:143: recipe for target `cygwin-console-helper.exe' failed
>>>>> make[3]: *** [cygwin-console-helper.exe] Error 1
>>>>> --- cut ---
>>>>> Likely some MinGW CRT bug ?
>>>>
>>>> This also occurs on Fedora right now.
>>>>
>>>> AFAICS, the culprit is that the latest Cygwin w32api package doesn't
>>>> match the files from mingw-crt for some reason.
>>>>
>>>> The build uses -L/usr/lib/w32api (-L/usr/i686-pc-cygwin/lib/w32api when
>>>> cross building on Fedora), so the libs are taken from the w32api-runtime
>>>> package. However, the compiler uses the default crt file
>>>> /usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/crt2.o which is provided
>>>> by the mingw-crt package.
>>>>
>>>> This is a bug in Cygwin's Makefile since you should never use the w32api
>>>> stuff for mingw executables, only for Cygwin executables, but still...
>>>>
>>>> JonY, do you have an idea why the mingw-crt differs that much from the
>>>> w32api stuff that the above error occurs?
>>>>
>>>
>>> Likely, because _set_invalid_parameter_handler was a stub in mingwex
>>> that loads msvcrt.dll, it was disabled as a quickfix, as it was using
>>> mingw-w64 stdlib.h directly. I did not think Cygwin win32api might need it.
>>>
>>> The build should be fixed on trunk, I will roll out a new release soon.
>>
>> Cool, thanks!
>
> Erm... hang on. On second thought, I'm not sure that this is a bug.
> The actual bug here was clearly in the Cygwin utils Makefile.
>
> In fact, since w32api should only be used by Cygwin executables, why
> should w32api provide libmingwex.a at all? Linking a Cygwin executable
> against libmingwex doesn't sound like the right thing to do. Shouldn't
> rather libmingwex.a just go from w32api?
>
Can you see what happens if libmingwex.a was replaced by the empty libm.a?
It is only _get_output_format require stuff from msvcrt,
_set_invalid_parameter_handler just uses some typedef declaration.
I'm starting to wonder if this require a deeper fix.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 834 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [BUG ?] Failed to rebuild Cygwin
2013-07-31 10:47 ` Corinna Vinschen
@ 2013-07-31 12:06 ` Pavel Fedin
2013-07-31 12:49 ` Corinna Vinschen
0 siblings, 1 reply; 13+ messages in thread
From: Pavel Fedin @ 2013-07-31 12:06 UTC (permalink / raw)
To: cygwin
Hello!
> I applied a patch which skips testing / or // when a /.. or //.. has
> been encountered. Can you please give it a try?
Where can i get it ? In svn ? I cannot rebuild the library...
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG ?] Failed to rebuild Cygwin
2013-07-31 12:02 ` JonY
@ 2013-07-31 12:06 ` Corinna Vinschen
2013-07-31 12:57 ` JonY
0 siblings, 1 reply; 13+ messages in thread
From: Corinna Vinschen @ 2013-07-31 12:06 UTC (permalink / raw)
To: cygwin
On Jul 31 19:31, JonY wrote:
> On 7/31/2013 18:47, Corinna Vinschen wrote:
> > Erm... hang on. On second thought, I'm not sure that this is a bug.
> > The actual bug here was clearly in the Cygwin utils Makefile.
> >
> > In fact, since w32api should only be used by Cygwin executables, why
> > should w32api provide libmingwex.a at all? Linking a Cygwin executable
> > against libmingwex doesn't sound like the right thing to do. Shouldn't
> > rather libmingwex.a just go from w32api?
> >
I just realize that libmingw*.a is not packed with w32api-runtime
anyway, so my question doesn't make sense.
> Can you see what happens if libmingwex.a was replaced by the empty libm.a?
I don't understand what you mean. Can you rephrase the question?
> It is only _get_output_format require stuff from msvcrt,
> _set_invalid_parameter_handler just uses some typedef declaration.
>
> I'm starting to wonder if this require a deeper fix.
Not sure, but the problem here was clearly that the crt2.o from
mingw-crt didn't match with what is provided by w32api-runtime.
However, there's no point linking against mingw-crt crt2.o but then use
the libs from w32api, so this isn't really a problem in w32api-runtime.
So, bottom line is, I'm not sure there's anything to fix in
w32api-runtime at all.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG ?] Failed to rebuild Cygwin
2013-07-31 12:06 ` Pavel Fedin
@ 2013-07-31 12:49 ` Corinna Vinschen
2013-07-31 14:12 ` Going back beyond the root (was: [BUG ?] Failed to rebuild Cygwin) Pavel Fedin
0 siblings, 1 reply; 13+ messages in thread
From: Corinna Vinschen @ 2013-07-31 12:49 UTC (permalink / raw)
To: cygwin
On Jul 31 16:02, Pavel Fedin wrote:
> Hello!
>
> > I applied a patch which skips testing / or // when a /.. or //.. has
> > been encountered. Can you please give it a try?
>
> Where can i get it ? In svn ? I cannot rebuild the library...
s/svn/cvs/
You can rebuild the lib, just update to the latest.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [BUG ?] Failed to rebuild Cygwin
2013-07-31 12:06 ` Corinna Vinschen
@ 2013-07-31 12:57 ` JonY
0 siblings, 0 replies; 13+ messages in thread
From: JonY @ 2013-07-31 12:57 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]
On 7/31/2013 19:49, Corinna Vinschen wrote:
> On Jul 31 19:31, JonY wrote:
>> On 7/31/2013 18:47, Corinna Vinschen wrote:
>>> Erm... hang on. On second thought, I'm not sure that this is a bug.
>>> The actual bug here was clearly in the Cygwin utils Makefile.
>>>
>>> In fact, since w32api should only be used by Cygwin executables, why
>>> should w32api provide libmingwex.a at all? Linking a Cygwin executable
>>> against libmingwex doesn't sound like the right thing to do. Shouldn't
>>> rather libmingwex.a just go from w32api?
>>>
>
> I just realize that libmingw*.a is not packed with w32api-runtime
> anyway, so my question doesn't make sense.
>
>> Can you see what happens if libmingwex.a was replaced by the empty libm.a?
>
> I don't understand what you mean. Can you rephrase the question?
>
Sorry, I was confused, I now see user was using the cross compiler, not
native gcc.
>> It is only _get_output_format require stuff from msvcrt,
>> _set_invalid_parameter_handler just uses some typedef declaration.
>>
>> I'm starting to wonder if this require a deeper fix.
>
> Not sure, but the problem here was clearly that the crt2.o from
> mingw-crt didn't match with what is provided by w32api-runtime.
> However, there's no point linking against mingw-crt crt2.o but then use
> the libs from w32api, so this isn't really a problem in w32api-runtime.
>
> So, bottom line is, I'm not sure there's anything to fix in
> w32api-runtime at all.
>
Nope, not related after all. I'm still trying to figure out the error.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 834 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Going back beyond the root (was: [BUG ?] Failed to rebuild Cygwin)
2013-07-31 12:49 ` Corinna Vinschen
@ 2013-07-31 14:12 ` Pavel Fedin
2013-07-31 14:24 ` Corinna Vinschen
0 siblings, 1 reply; 13+ messages in thread
From: Pavel Fedin @ 2013-07-31 14:12 UTC (permalink / raw)
To: cygwin
Hello!
> s/svn/cvs/
>
> You can rebuild the lib, just update to the latest.
Thank you, tested and works fine. Testing included:
1. Accessing existing directories then ..
2. Accessing nonexistent directories then ..
3. Going beyond the root multiple times (/../../../../../..)
4. The same, but with UNC. (3) in this context attempts to access '//', which on my machine waits for a while then ends up in "Permission denied". 'NET VIEW' in native Windows console behaves similar, reporting "List of servers is not currently available". So - passed.
5. Running make test suite. abspath works fine now.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Going back beyond the root (was: [BUG ?] Failed to rebuild Cygwin)
2013-07-31 14:12 ` Going back beyond the root (was: [BUG ?] Failed to rebuild Cygwin) Pavel Fedin
@ 2013-07-31 14:24 ` Corinna Vinschen
0 siblings, 0 replies; 13+ messages in thread
From: Corinna Vinschen @ 2013-07-31 14:24 UTC (permalink / raw)
To: cygwin
On Jul 31 17:26, Pavel Fedin wrote:
> Hello!
>
> > s/svn/cvs/
> >
> > You can rebuild the lib, just update to the latest.
>
> Thank you, tested and works fine. Testing included:
>
> 1. Accessing existing directories then ..
> 2. Accessing nonexistent directories then ..
> 3. Going beyond the root multiple times (/../../../../../..)
> 4. The same, but with UNC. (3) in this context attempts to access '//', which on my machine waits for a while then ends up in "Permission denied". 'NET VIEW' in native Windows console behaves similar, reporting "List of servers is not currently available". So - passed.
Apparently smb browsing is switched off on your machine. I tested this
myself with some extra debugging output. Should work the same as /..,
just that you're back in // instead of /.
> 5. Running make test suite. abspath works fine now.
Thanks for testing,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-07-31 14:12 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-31 10:14 [BUG ?] Failed to rebuild Cygwin Pavel Fedin
2013-07-31 10:27 ` Corinna Vinschen
2013-07-31 10:28 ` JonY
2013-07-31 11:23 ` Corinna Vinschen
2013-07-31 11:32 ` Corinna Vinschen
2013-07-31 12:02 ` JonY
2013-07-31 12:06 ` Corinna Vinschen
2013-07-31 12:57 ` JonY
2013-07-31 10:47 ` Corinna Vinschen
2013-07-31 12:06 ` Pavel Fedin
2013-07-31 12:49 ` Corinna Vinschen
2013-07-31 14:12 ` Going back beyond the root (was: [BUG ?] Failed to rebuild Cygwin) Pavel Fedin
2013-07-31 14:24 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).