<<< Date Index >>>     <<< Thread Index >>>

Re: Segmentation fault



* Thomas Glanzmann <sithglan@xxxxxxxxxxxxxxxxxxxx>:
  [2005-05-19 14:01:19 +0200]

> I have made another patch ready which should get rid of this damn
> segfault. (The last you reported).

Applied and running in valgrind.

By the way, I'm attaching some stack trace from a new SEGV I got
while I was having lunch, which is related to the threads sorting.
I can't figure out where the problem is, though... Anyway, I have
the core file, so I can get extra information if the one provided
lacks anything.

> [...] please always report all 'invalid read of size bla' when
> the backtrace differs (the point where they appear).

I'm doing so (I don't recall forgetting any invalid read) but I'm
actually filtering other weird messages from SSL libs like these
(I'm sure they're not related to the SEGV in threads sorting):

Conditional jump or move depends on uninitialised value(s)
   at 0x1B9FD287: asn1_Finish (in /lib/libcrypto.so.0.9.6b)
   by 0x1BA0EB62: d2i_GENERAL_NAME (in /lib/libcrypto.so.0.9.6b)
   by 0x1B9E9192: d2i_ASN1_SET (in /lib/libcrypto.so.0.9.6b)
   by 0x1BA0ED54: d2i_GENERAL_NAMES (in /lib/libcrypto.so.0.9.6b)
   by 0x1BA101DD: d2i_AUTHORITY_KEYID (in /lib/libcrypto.so.0.9.6b)
   by 0x1BA0D237: X509V3_EXT_d2i (in /lib/libcrypto.so.0.9.6b)
   by 0x1BA0D328: X509V3_get_d2i (in /lib/libcrypto.so.0.9.6b)
   by 0x1BA07D3B: X509_get_ext_d2i (in /lib/libcrypto.so.0.9.6b)
   by 0x1BA14679: x509v3_cache_extensions (in /lib/libcrypto.so.0.9.6b)
   by 0x1BA149CD: X509_check_issued (in /lib/libcrypto.so.0.9.6b)

...

Use of uninitialised value of size 4
   at 0x1B9BA613: BN_num_bits_word (in /lib/libcrypto.so.0.9.6b)
   by 0x1B9BA696: BN_num_bits (in /lib/libcrypto.so.0.9.6b)
   by 0x1B9BAE2C: BN_bn2bin (in /lib/libcrypto.so.0.9.6b)
   by 0x1B9C0BFC: RSA_eay_public_encrypt (in /lib/libcrypto.so.0.9.6b)
   by 0x1B9C2775: RSA_public_encrypt (in /lib/libcrypto.so.0.9.6b)
   by 0x1B9618F9: ssl3_send_client_key_exchange (in /lib/libssl.so.0.9.6b)
   by 0x1B95FC3F: ssl3_connect (in /lib/libssl.so.0.9.6b)
   by 0x1B96A32F: SSL_connect (in /lib/libssl.so.0.9.6b)
   by 0x1B96791E: ssl23_get_server_hello (in /lib/libssl.so.0.9.6b)
   by 0x1B9672C8: ssl23_connect (in /lib/libssl.so.0.9.6b)

Anyway, I'll try to report all the context around invalid reads.

--
Alex Muntada <alexm@xxxxxxxxx>
http://alexm.org/

Sorting mailbox...
Program received signal SIGSEGV, Segmentation fault.
_mutt_traverse_thread (ctx=0x8127c98, cur=0x812c888, flag=4) at thread.c:1146
1146      if (!cur->read && CHECK_LIMIT)
(gdb) i s
#0  _mutt_traverse_thread (ctx=0x8127c98, cur=0x812c888, flag=4)
    at thread.c:1146
#1  0x080a2acd in mutt_set_virtual (ctx=0x8127c98) at thread.c:1116
#2  0x080a0491 in mutt_sort_headers (ctx=0x8127c98, init=135436232)
    at sort.c:331
#3  0x0805f5f5 in update_index (menu=0x8139168, ctx=0x8127c98, check=1, 
    oldcount=63, index_hint=0) at curs_main.c:317
#4  0x08064bc4 in mutt_index_menu () at curs_main.c:492
#5  0x08077a86 in main (argc=2, argv=0xbfffe8f4) at main.c:934
#6  0x42017589 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) p cur
$1 = (HEADER *) 0x812c888
(gdb) p *cur
$2 = {security = 0, mime = 0, flagged = 0, tagged = 0, deleted = 0, 
  changed = 0, attach_del = 0, old = 0, read = 0, expired = 0, superseded = 0, 
  replied = 0, subject_changed = 1, threaded = 1, display_subject = 1, 
  recip_valid = 0, active = 1, trash = 0, zhours = 8, zminutes = 0, 
  zoccident = 0, searched = 0, matched = 0, collapsed = 0, limited = 0, 
  num_hidden = 0, recipient = 0, pair = 0, date_sent = 1116505215, 
  received = 1116505240, offset = 0, lines = 0, index = 46, msgno = 46, 
  virtual = 46, score = 0, env = 0x812c8e0, content = 0x812c778, path = 0x0, 
  tree = 0x0, thread = 0x812e080, data = 0x812c878, maildir_flags = 0x0}
(gdb) p (!ctx->pattern || cur->limited)
$3 = 1
(gdb) p ctx
$4 = (CONTEXT *) 0x8127c98
(gdb) p *ctx
$5 = {path = 0x811e418 "imaps://alexm@xxxxxxxxxxxxxxx/INBOX", fp = 0x0, 
  mtime = 0, mtime_cur = 0, size = 0, vsize = 526060, pattern = 0x0, 
  limit_pattern = 0x0, hdrs = 0x81297c8, tree = 0x810b988, id_hash = 0x0, 
  subj_hash = 0x8108ea8, thread_hash = 0x8127e20, v2r = 0x811ecc0, 
  hdrmax = 109, msgcount = 109, vcount = 47, tagged = 0, new = 107, 
  unread = 107, deleted = 0, flagged = 0, msgnotreadyet = -1, 
  data = 0x8106e10, magic = 5, locked = 0, changed = 0, readonly = 0, 
  dontwrite = 0, append = 0, quiet = 0, collapsed = 0, closing = 0}
(gdb) p thread
$6 = (THREAD *) 0xbfffd9e0
(gdb) p *thread
$7 = {fake_thread = 0, duplicate_thread = 1, sort_children = 1, 
  check_subject = 1, visible = 0, deep = 1, subtree_visible = 0, 
  next_subtree_visible = 0, parent = 0x0, child = 0xbfffd9e0, 
  next = 0x812c888, prev = 0x8127c98, message = 0x2e, sort_key = 0xbfffda18}
(gdb) 

Attachment: pgp8ZhD7H6S8s.pgp
Description: PGP signature