Pierre A. Humblet | 1 Dec 2002 06:03
Picon

Re: Internal get{pw,gr}XX calls

Corinna,

The attached patch includes the changes to grab_int and parse_grp.
I like your initial idea (a little simplified) better because it 
leaves uid = -1 as a usable value. That may prove useful one day 
(I have some ideas). It also makes parse_pwd somewhat simpler.

strtoul replaces strtol. I have verified that both strtoul("-2",..)
and strtoul("4294967294",..) return 0xFFFFFFFE.

I have kept updating the state to loaded in read_etc_{passwd,group}.

This patch replaces what I sent on Friday. It is incremental over
the earlier big patch involving 9 files.

Pierre

2002-11-30  Pierre Humblet <pierre.humblet <at> ieee.org>

	* pwdgrp.h (pwdgrp_check::pwdgrp_state): Replace by 
	pwdgrp_check::isinitializing ().
	(pwdgrp_check::isinitializing): Create.
	* passwd.cc (grab_int): Change type to unsigned, use strtoul and 
	set the pointer content to 0 if the field is invalid.
	(parse_pwd): Move validity test after getting pw_gid.
	(read_etc_passwd): Replace "passwd_state <= " by 
	passwd_state::isinitializing ().	
	(internal_getpwuid): Ditto.
	(internal_getpwnam): Ditto.
	(getpwent): Ditto.
(Continue reading)

Alexander Gottwald | 1 Dec 2002 23:10
Picon

Xfixes required libs

The patch adds the SharedXfixesReqs for cygwin

Index: cygwin.tmpl
===================================================================
RCS file: /cvs/xc/config/cf/cygwin.tmpl,v
retrieving revision 3.12
diff -u -3 -r3.12 cygwin.tmpl
--- cygwin.tmpl	2002/10/17 08:18:18	3.12
+++ cygwin.tmpl	2002/12/01 22:08:53
 <at>  <at>  -35,6 +35,7  <at>  <at> 
 #define SharedXmuuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB)
 #define SharedXrandrReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
 #define SharedXcursorReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB) 
+#define SharedXfixesReqs $(LDPRELIB) $(XLIB) 

 
 #ifndef FixupLibReferences

NP: JBO - Ällabätsch
--

-- 
 Alexander.Gottwald <at> informatik.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723

Alexander Gottwald | 1 Dec 2002 23:20
Picon

Re: Xfixes required libs

Alexander Gottwald wrote:

> The patch adds the SharedXfixesReqs for cygwin

Sorry, took wrong *patches* list :(

bye
    ago
--

-- 
 Alexander.Gottwald <at> informatik.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723

Ralf Habacker | 1 Dec 2002 23:46
Picon
Favicon

[patch] fixes segfault while mutexattr initialisation

Hi,

while porting the threaded qt-3 release to cygwin, it seems to me, that there is
a bug in the current cygwin pthread implementation.

The problem:

Parts of the qt-3 thread initialisation code (which works under linux) look like
below:

	<snip>
    pthread_mutexattr_t attr;
    pthread_mutexattr_init(&attr);
	<snip>

which lets attr undefined. The specification of this functions in
http://www.opengroup.org/onlinepubs/007904975/functions/pthread_mutexattr_init.h
tml tells me, that pthread_mutexattr_init() should initialise attr.

In the example I found with gcc (2.59.3-5)/ld the (stack-)content is 0xc, which
lets pthread_mutexattr_init() crash.

A look into the code shows:

__pthread_mutexattr_init (pthread_mutexattr_t *attr)
{
[1]  if (pthread_mutexattr::isGoodObject (attr))
	// calls -> verifyable_object_isvalid ->
check_valid_pointer ->IsBadWritePtr(*attr) -> segfault!!
[1]   return EBUSY;
(Continue reading)

egor duda | 2 Dec 2002 11:30
Picon

--enable-runtime-pseudo-reloc support in cygwin, take 3.

Hi!

Tuesday, 19 November, 2002 egor duda deo <at> logos-m.ru wrote:

ed> Tuesday, 19 November, 2002 Christopher Faylor cygwin <at> cygwin.com wrote:

CF>> I've made a new version of binutils available for download.  This is
CF>> just a refresh from sources.redhat.com.  A notable change is the
CF>> addition of Egor Duda's --enable-runtime-pseudo-reloc option which
CF>> allows almost transparent linking of dll's without the need of a def
CF>> file.  However, this option requires functionality in the cygwin DLL
CF>> which is not yet present.  Stay tuned.

ed> Ok, it's time to revive a discussion about implementation of
ed> pseudo-relocations in runtime. So far, there were 3 propositions:

ed> 1. Implement everything in application (in crt0.o)
ed> Benefits: Will work with any version of cygwin1.dll. All problems with
ed> lack of support from runtime are detected during application linking.
ed> (Possibly) common code with mingw.
ed> Drawbacks: Will require rebuilding application in case we'll want
ed> change something.

ed> 2. Implement everything in cygwin1.dll. In this case application is
ed> about to have an external reference to _pei386_runtime_relocator.
ed> Benefits: Easy to change relocation semantics without relinking
ed> application.
ed> Drawbacks: GUI window popping up when "new" application is loaded with
ed> "old" runtime. Lack of support is detected only at application
ed> startup.
(Continue reading)

egor duda | 2 Dec 2002 12:08
Picon

Re: --enable-runtime-pseudo-reloc support in cygwin, take 3.

Hi!

Monday, 02 December, 2002 egor duda deo <at> logos-m.ru wrote:

ed> 2002-12-02  Egor Duda <deo <at> logos-m.ru>
ed>         * cygwin/lib/pseudo-reloc.c: New file.

I guess i should put it to the public domain, so that mingw folks can
also use it.

Egor.            mailto:deo <at> logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
Attachment (pseudo-reloc.c): application/octet-stream, 1139 bytes
Earnie Boyd | 2 Dec 2002 13:48
Picon
Favicon

Re: --enable-runtime-pseudo-reloc support in cygwin, take 3.

egor duda wrote:
> Hi!
> 
> Monday, 02 December, 2002 egor duda deo <at> logos-m.ru wrote:
> 
> ed> 2002-12-02  Egor Duda <deo <at> logos-m.ru>
> ed>         * cygwin/lib/pseudo-reloc.c: New file.
> 
> I guess i should put it to the public domain, so that mingw folks can
> also use it.
> 

Is it usable without Cygwin?

Earnie.

egor duda | 2 Dec 2002 14:00
Picon

Re: --enable-runtime-pseudo-reloc support in cygwin, take 3.

Hi!

Monday, 02 December, 2002 Earnie Boyd earnie_boyd <at> yahoo.com wrote:

EB> egor duda wrote:
>> Monday, 02 December, 2002 egor duda deo <at> logos-m.ru wrote:
>> 
>> ed> 2002-12-02  Egor Duda <deo <at> logos-m.ru>
>> ed>         * cygwin/lib/pseudo-reloc.c: New file.
>> 
>> I guess i should put it to the public domain, so that mingw folks can
>> also use it.
>> 

EB> Is it usable without Cygwin?

Yes. It doesn't use any cygwin functionality. Recent binutils should
export __RUNTIME_PSEUDO_RELOC_LIST__ and __RUNTIME_PSEUDO_RELOC_LIST_END__
symbols for all PE-based targets, including Mingw.

I'm not that familiar with Mingw internals, but you just have to
add a call to _pei386_runtime_relocator() to the application startup
(to the crt2.o, IIRC) and link with pseudo-reloc.o.

Egor.            mailto:deo <at> logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19

Earnie Boyd | 2 Dec 2002 14:20
Picon
Favicon

Re: --enable-runtime-pseudo-reloc support in cygwin, take 3.

egor duda wrote:
> Hi!
> 
> Monday, 02 December, 2002 Earnie Boyd earnie_boyd <at> yahoo.com wrote:
> 
> EB> egor duda wrote:
> 
>>>Monday, 02 December, 2002 egor duda deo <at> logos-m.ru wrote:
>>>
>>>ed> 2002-12-02  Egor Duda <deo <at> logos-m.ru>
>>>ed>         * cygwin/lib/pseudo-reloc.c: New file.
>>>
>>>I guess i should put it to the public domain, so that mingw folks can
>>>also use it.
>>>
>>
> 
> EB> Is it usable without Cygwin?
> 
> Yes. It doesn't use any cygwin functionality. Recent binutils should
> export __RUNTIME_PSEUDO_RELOC_LIST__ and __RUNTIME_PSEUDO_RELOC_LIST_END__
> symbols for all PE-based targets, including Mingw.
> 
> I'm not that familiar with Mingw internals, but you just have to
> add a call to _pei386_runtime_relocator() to the application startup
> (to the crt2.o, IIRC) and link with pseudo-reloc.o.
> 

So, should this be a part of binutils instead of Cygwin?

(Continue reading)

egor duda | 2 Dec 2002 14:27
Picon

Re: --enable-runtime-pseudo-reloc support in cygwin, take 3.

Hi!

Monday, 02 December, 2002 Earnie Boyd earnie_boyd <at> yahoo.com wrote:

EB> egor duda wrote:
>> Hi!
>> 
>> Monday, 02 December, 2002 Earnie Boyd earnie_boyd <at> yahoo.com wrote:
>> 
>> EB> egor duda wrote:
>> 
>>>>Monday, 02 December, 2002 egor duda deo <at> logos-m.ru wrote:
>>>>
>>>>ed> 2002-12-02  Egor Duda <deo <at> logos-m.ru>
>>>>ed>         * cygwin/lib/pseudo-reloc.c: New file.
>>>>
>>>>I guess i should put it to the public domain, so that mingw folks can
>>>>also use it.
>>>>
>>>
>> 
>> EB> Is it usable without Cygwin?
>> 
>> Yes. It doesn't use any cygwin functionality. Recent binutils should
>> export __RUNTIME_PSEUDO_RELOC_LIST__ and __RUNTIME_PSEUDO_RELOC_LIST_END__
>> symbols for all PE-based targets, including Mingw.
>> 
>> I'm not that familiar with Mingw internals, but you just have to
>> add a call to _pei386_runtime_relocator() to the application startup
>> (to the crt2.o, IIRC) and link with pseudo-reloc.o.
(Continue reading)


Gmane