public inbox for
 help / color / mirror / Atom feed
From: "Brian Bazyk" <>
Subject: CRT runtime error with .Net 2003
Date: Thu, 11 Mar 2004 23:30:00 -0000	[thread overview]
Message-ID: <> (raw)

Hi, I'm very new here but you seem like a helpful bunch of people.  I have 
the glorious job of porting a Linux application that uses pthreads to 
Win32 .Net 2003.

The app used pthreads so I'm linking statically with the pthreadsVC 
library.  I'm compiling with MTd runtime's and using 
IgnoreLib:libcmtd;libmmt to deal with some redefined function issues.

I'm recieving a runtime write segfault on the line:
fprintf(stderr,"Program usage: %s <prediction file>.pred | <PDB 

Debugging at the segfault gives me (_file.c):

void __cdecl _lock_file (
        void *pf
         * The way the FILE (pointed to by pf) is locked depends on whether
         * it is part of _iob[] or not
        if ( (pf >= (void *)_iob) && (pf <= (void *)(&_iob[_IOB_ENTRIES-
1])) )
             * FILE lies in _iob[] so the lock lies in _locktable[].
            _lock( _STREAM_LOCKS + (int)((FILE *)pf - _iob) );
             * Not part of _iob[]. Therefore, *pf is a _FILEX and the
             * lock field of the struct is an initialized critical
             * section.
!!ThisLine!!  EnterCriticalSection( &(((_FILEX *)pf)->lock) );

Any idea what's wrong with my CRT?  Are there any particular linker 
options or something else I may not be aware of?  Could this even be 
related to pthreads or is it something else wrong with the project.
Any ideas would be appreciated.

Thanks in advance,

             reply	other threads:[~2004-03-11 23:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-11 23:30 Brian Bazyk [this message]
2004-03-11 23:57 ` Mark Weaver
2004-03-12 11:17 ` vc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).