Kent Sibilev wrote:
> With this patch applied MacVim still crashes for me. Note that it
> doesn't do that if I instead apply the second Nico's patch. These are
> details of from gdb:
>
> Exception Type: EXC_BAD_ACCESS (SIGBUS)
> Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000000b7058
> Crashed Thread: 0
> (gdb) where
> #0 0x0002afa1 in dict_free (d=0x35a42f0, recurse=1) at eval.c:6772
> #1 0x0002b07a in dict_unref (d=0x35a42f0) at eval.c:6752
> #2 0x0002a980 in clear_tv (varp=0x3413f60) at eval.c:18600
> #3 0x0002c217 in vars_clear_ext (ht=0x8589c0, free_val=1) at eval.c:19037
> #4 0x0002c25e in vars_clear (ht=0x34119f0) at eval.c:19009
> #5 0x0002c285 in free_funccal (fc=0x858800, free_val=1) at eval.c:21512
> #6 0x0002c6ee in garbage_collect () at eval.c:6579
> #7 0x00075939 in before_blocking () at getchar.c:1473
> #8 0x000dd53d in mch_inchar (buf=0x35a7001 "", maxlen=95, wtime=-1,
> tb_change_cnt=21118) at os_unix.c:385
> #9 0x00136ec5 in ui_inchar (buf=0x35a7001 "", maxlen=95, wtime=-1,
> tb_change_cnt=21118) at ui.c:193
> #10 0x00075c3a in inchar (buf=0x35a7001 "", maxlen=287, wait_time=-1,
> tb_change_cnt=21118) at getchar.c:2959
> #11 0x00078eda in vgetorpeek (advance=1) at getchar.c:2735
> #12 0x00079441 in vgetc () at getchar.c:1552
> #13 0x00079898 in safe_vgetc () at getchar.c:1757
> #14 0x000c09ed in normal_cmd (oap=0xbffff350, toplevel=1) at normal.c:654
> #15 0x00082d39 in main_loop (cmdwin=0, noexmode=0) at main.c:1255
> #16 0x00086a87 in main (argc=54598128, argv=0x34119f0) at main.c:1002
> (gdb) list
> 6767
> 6768 /* Remove the dict from the list of dicts for garbage collection.
> */
> 6769 if (d->dv_used_prev == NULL)
> 6770 first_dict = d->dv_used_next;
> 6771 else
> 6772 d->dv_used_prev->dv_used_next = d->dv_used_next;
> 6773 if (d->dv_used_next != NULL)
> 6774 d->dv_used_next->dv_used_prev = d->dv_used_prev;
> 6775
> 6776 /* Lock the hashtab, we don't want it to resize while
> freeing items. */
> (gdb) p *d
> $44 = {
> dv_refcount = -1073741822,
> dv_hashtab = {
> ht_mask = 3234897895,
> ht_used = 11,
> ht_filled = 18,
> ht_locked = 1,
> ht_error = 0,
> ht_array = 0x85ee00,
> ht_smallarray = {{
> hi_hash = 1680060352,
> hi_key = 0x34c692d "posStack"
> }, {
> hi_hash = 881893521,
> hi_key = 0x347d13d "functionContainer"
> }, {
> hi_hash = 123778642,
> hi_key = 0x342829d "wrap"
> }, {
> hi_hash = 1110333171,
> hi_key = 0x3415ead "varPriority"
> }, {
> hi_hash = 122576644,
> hi_key = 0x34bf01d "vars"
> }, {
> hi_hash = 2430892566,
> hi_key = 0x34bde9d "wrapStartPos"
> }, {
> hi_hash = 1646883926,
> hi_key = 0x34bd31d "tmplarr"
> }, {
> hi_hash = 2145903751,
> hi_key = 0x34803ed "funcs"
> }, {
> hi_hash = 398141396,
> hi_key = 0x34a1acd "lastPopup"
> }, {
> hi_hash = 2409478612,
> hi_key = 0x34a295d "startColumn"
> }, {
> hi_hash = 3497526042,
> hi_key = 0x341fc5d "stack"
> }, {
> hi_hash = 1528633632,
> hi_key = 0x34a1c4d "wrappedNameTree"
> }, {
> hi_hash = 3594528268,
> hi_key = 0x34bfb9d "tmpls"
> }, {
> hi_hash = 3360825129,
> hi_key = 0x3487c5d "nameTree"
> }, {
> hi_hash = 0,
> hi_key = 0x0
> }, {
> hi_hash = 2739356453,
> hi_key = 0x3485b6d "keyword"
> }}
> },
> dv_copyID = 1862,
> dv_copydict = 0x3231203a,
> dv_lock = 0 '\0',
> dv_used_next = 0x34119f0,
> dv_used_prev = 0xb6fb0
> }
>
> It looks like d->dv_refcount is invalid and d->dv_used_prev point is
> suspicious:
>
> (gdb) p *d->dv_used_prev
> $46 = {
> dv_refcount = 533,
> dv_hashtab = {
> ht_mask = 552,
> ht_used = 552,
> ht_filled = 552,
> ht_locked = 540,
> ht_error = 547,
> ht_array = 0x1f2,
> ht_smallarray = {{
> hi_hash = 96442,
> hi_key = 0xba2feb00 <Address 0xba2feb00 out of bounds>
> }, {
> hi_hash = 8364,
> hi_key = 0x60ba28eb <Address 0x60ba28eb out of bounds>
> }, {
> hi_hash = 3942645761,
> hi_key = 0x161ba21 ""
> }, {
> hi_hash = 451608576,
> hi_key = 0x17dba "\v#####"
> }, {
> hi_hash = 3121867520,
> hi_key = 0x17e <Address 0x17e out of bounds>
> }, {
> hi_hash = 1387924715,
> hi_key = 0xeb000001 <Address 0xeb000001 out of bounds>
> }, {
> hi_hash = 22264325,
> hi_key = 0x4d8b0000 <Address 0x4d8b0000 out of bounds>
> }, {
> hi_hash = 608995784,
> hi_key = 0x24148904 <Address 0x24148904 out of bounds>
> }, {
> hi_hash = 4293319400,
> hi_key = 0xc84501ff <Address 0xc84501ff out of bounds>
> }, {
> hi_hash = 1003505151,
> hi_key = 0x850fd075 <Address 0x850fd075 out of bounds>
> }, {
> hi_hash = 4294967067,
> hi_key = 0xc6c87d8b <Address 0xc6c87d8b out of bounds>
> }, {
> hi_hash = 2105737223,
> hi_key = 0x840f0010 <Address 0x840f0010 out of bounds>
> }, {
> hi_hash = 1409,
> hi_key = 0x452bf889 <Address 0x452bf889 out of bounds>
> }, {
> hi_hash = 274041760,
> hi_key = 0x72e90289 <Address 0x72e90289 out of bounds>
> }, {
> hi_hash = 2332033029,
> hi_key = 0x1189144d <Address 0x1189144d out of bounds>
> }, {
> hi_hash = 2311355787,
> hi_key = 0x2ce9ac7d <Address 0x2ce9ac7d out of bounds>
> }}
> },
> dv_copyID = -1929379838,
> dv_copydict = 0x4890146,
> dv_lock = 36 '$',
> dv_used_next = 0x4589ffff,
> dv_used_prev = 0xfc085a0
> }
>
> I assume this is duble dealloc problem, but unfortunately I have no
> idea how to track it down.
> Hope it helps.
Do you have a reasonable simple way to reproduce this?
--
Managers are like cats in a litter box. They instinctively shuffle things
around to conceal what they've done.
(Scott Adams - The Dilbert principle)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---