c - __libc_lock_lock is segfaulting -


I am working on a piece of code that uses regular expression in C.

All regex stuff is using standard regex c library.

On the line 246's regexec.c, the line is

  __ libc_lock_lock (dfa-> lock);  

My program is flagging here and I do not know why I was trying to figure out where __libc_lock_lock was defined and it has been found that this bits The macro in / libc-lock.h is However, the macro is not really anything defined, just defined.

Two questions:

1) When code is run when __libc_lock_lock is called (I know it should be

2) If DFA The re_def_ty object that is extracted from the AC string which is a regex_t object type buffer member, then no member will lock it. What should this happen?

This literally grows as if __libc_lock_lock

if Segfault libc , you can be 99.9% of the following:

  1. You are doing something wrong API
  2. You have some previous points There is a memory or corrupted memory used by the Libers, and this is a delayed effect. (Thank you Tyler!)
  3. You are doing something that is moving the capability of the API
  4. You are a developer who can test the trunk with new changes in the current implementation

I suspect that the first reason is to post your API usage and your library version can help the Regexp API in Libc is very stable.

To find the stack trace of the executable path running for segfault, see debugging with gdb , and glibc-devel packages for symbols. Install if the CGFT (or outside) is in libc ... then you've done something bad (for example an opaque indicator is not started)

  [aiden @ devbox ~ ] $ Gdb / My program (GDB) R ... load of luggage, segfault information .. (GDB) BT  

Print by the name of the stack and function name that was induced for the seagull.

Get an authentic source for API usage / examples!

Good luck


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -