Then put a breakpoint on the "p" being passed into this function to catch when it changes....it should only change maybe once during execution (not sure about that though).
Assuming your program runs the same in debug as it does when not in debug (which frequently changes behaviors in these situations). Your segfault may move. Matter of fact, if it doesn't change/move when you add DUMA or such you may have a more systemic error on your side. Usually buffer overruns or stack corruption moves under different compilation options. You got arrays of some sort? Or char* that you are manipulating? Or char[] that you are abusing? Those are the most common errors. And I guess you can't show us your code? Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems ________________________________ From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Christian [siriu...@gmx.de] Sent: Thursday, October 27, 2011 6:49 AM To: General Discussion of SQLite Database; sqlite-users@sqlite.org Subject: EXT :Re: [sqlite] Segmentation Fault on SQLITE3_exex Honestly I already expected for this kind of answer. I keep on debugging the code using DUMA. Thanks alot for the swift response! -------- Original-Nachricht -------- > Datum: Thu, 27 Oct 2011 10:42:37 +0000 > Von: "Black, Michael (IS)" <michael.bla...@ngc.com> > An: General Discussion of SQLite Database <sqlite-users@sqlite.org> > Betreff: Re: [sqlite] Segmentation Fault on SQLITE3_exex > Me thinkst you're corrupting your stack or memory. > > > > I'd be willing to bet big money that this is your program causing this as > there are 1000's of people running that exact same call without any problem > at all (like me and I've been using it like crazy across multiple versions > of SQLite) > > > > If you can try using something like efence which may help detect it. I > assume you're on a Unix flavor? > > > > > > > > Michael D. Black > > Senior Scientist > > Advanced Analytics Directorate > > Advanced GEOINT Solutions Operating Unit > > Northrop Grumman Information Systems > > ________________________________ > From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on > behalf of Christian [siriu...@gmx.de] > Sent: Thursday, October 27, 2011 4:51 AM > To: sqlite-users@sqlite.org > Subject: EXT :[sqlite] Segmentation Fault on SQLITE3_exex > > Hello everybody, > > I'm facing a strange issue and believe that my setup is somehow wrong. > From time to time my program crashes with segfault when calling: > if (sqlite3_exec (db, "BEGIN TRANSACTION", 0, 0, 0) != SQLITE_OK) > { > //error > } > > The stacktrace points to this function: > > static void pthreadMutexEnter(sqlite3_mutex *p){ > assert( p->id==SQLITE_MUTEX_RECURSIVE || pthreadMutexNotheld(p) ); > > #ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX > { > pthread_t self = pthread_self(); > if( p->nRef>0 && pthread_equal(p->owner, self) ){ > p->nRef++; > }else{ > pthread_mutex_lock(&p->mutex); > assert( p->nRef==0 ); > p->owner = self; > p->nRef = 1; > } > } > #else > /* Use the built-in recursive mutexes if they are available. > */ > pthread_mutex_lock(&p->mutex); //!HERE IT GETS a SEGFAULT! > #if SQLITE_MUTEX_NREF > assert( p->nRef>0 || p->owner==0 ); > p->owner = pthread_self(); > p->nRef++; > #endif > } > > > Any ideas why this happens, or how I could workaround the issue? The query > works like 300 times and then suddenly crashes, I checked this with > version 3.6.22 (as library) and the actual sources (3.7.8 _ 3007008). > > Best regards, > Chris. > -- > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! > Jetzt informieren: http://www.gmx.net/de/go/freephone > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de<https://freundschaftswerbung.gmx.de/> _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users