Bug 1397180

Summary: Crashes if I start searching too fast in pidgin.spec
Product: [Fedora] Fedora Reporter: Debarshi Ray <debarshir>
Component: emacsAssignee: Jan Synacek <jsynacek>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: jonathan.underwood, jsynacek, msekleta, phracek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-12 10:28:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Debarshi Ray 2016-11-21 19:54:06 UTC
If I open pidgin.spec from the Fedora master branch (emacs -nw pidgin.spec) and start searching too fast (ie. before it has completely rendered the buffer), then it crashes. I press ctrl+c, followed by 'R e q u i r e s'.

Here is the backtrace:

#0  0x0000000000541d38 in re_search_2 (bufp=bufp@entry=0xb99cb8 <searchbufs+3992>, str1=str1@entry=0x16a7c58 <error: Cannot access memory at address 0x16a7c58>, size1=size1@entry=0, str2=str2@entry=0x16a7c58 <error: Cannot access memory at address 0x16a7c58>, size2=size2@entry=59066, startpos=3481, range=2642, regs=0xb98cf0 <search_regs>, stop=6123)
    at ../../src/regex.c:4464
#1  0x0000000000536c45 in search_buffer (string=string@entry=15659524, pos=<optimized out>, pos_byte=<optimized out>, lim=lim@entry=6124, lim_byte=lim_byte@entry=6124, n=n@entry=1, RE=1, trt=18646677, inverse_trt=16739653, posix=false)
    at ../../src/search.c:1265
#2  0x0000000000538065 in search_command (string=15659524, bound=<optimized out>, noerror=44592, count=<optimized out>, direction=direction@entry=1, RE=RE@entry=1, posix=false) at ../../src/search.c:1058
#3  0x0000000000538257 in Fre_search_forward (regexp=<optimized out>, bound=<optimized out>, noerror=<optimized out>, count=<optimized out>) at ../../src/search.c:2264
#4  0x0000000000565c23 in Ffuncall (nargs=4, args=args@entry=0x7fffffff7658) at ../../src/eval.c:2704
#5  0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=2, args=<optimized out>, args@entry=0xeef284)
    at ../../src/bytecode.c:880
#6  0x0000000000565776 in funcall_lambda (fun=140737488320720, nargs=nargs@entry=2, arg_vector=0xeef284, 
    arg_vector@entry=0x7fffffff7848) at ../../src/eval.c:2855
#7  0x0000000000565a4b in Ffuncall (nargs=3, args=args@entry=0x7fffffff7840) at ../../src/eval.c:2754
#8  0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=1, args=<optimized out>, args@entry=0x99cedc <pure+1311900>)
    at ../../src/bytecode.c:880
#9  0x0000000000565776 in funcall_lambda (fun=140737488321152, nargs=nargs@entry=1, arg_vector=0x99cedc <pure+1311900>, arg_vector@entry=0x7fffffff79f0) at ../../src/eval.c:2855
#10 0x0000000000565a4b in Ffuncall (nargs=2, args=args@entry=0x7fffffff79e8) at ../../src/eval.c:2754
#11 0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=0, nargs=nargs@entry=0, args=<optimized out>, args@entry=0x0)
    at ../../src/bytecode.c:880
#12 0x000000000056564d in funcall_lambda (fun=10095789, nargs=nargs@entry=3, arg_vector=arg_vector@entry=0x7fffffff7c10) at ../../src/eval.c:2921
#13 0x0000000000565a4b in Ffuncall (nargs=4, args=args@entry=0x7fffffff7c08) at ../../src/eval.c:2754
#14 0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=0, nargs=nargs@entry=0, args=<optimized out>, args@entry=0x0)
    at ../../src/bytecode.c:880
#15 0x000000000056564d in funcall_lambda (fun=10091797, nargs=nargs@entry=3, arg_vector=arg_vector@entry=0x7fffffff7e20) at ../../src/eval.c:2921
#16 0x0000000000565a4b in Ffuncall (nargs=4, args=args@entry=0x7fffffff7e18) at ../../src/eval.c:2754
#17 0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=0, nargs=nargs@entry=0, args=<optimized out>, args@entry=0x0)
    at ../../src/bytecode.c:880
#18 0x000000000056564d in funcall_lambda (fun=10089509, nargs=nargs@entry=2, arg_vector=arg_vector@entry=0x7fffffff8038) at ../../src/eval.c:2921
#19 0x0000000000565a4b in Ffuncall (nargs=3, args=args@entry=0x7fffffff8030) at ../../src/eval.c:2754
#20 0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=1, args=<optimized out>, args@entry=0x9a4a34 <pure+1343476>)
    at ../../src/bytecode.c:880
#21 0x0000000000565776 in funcall_lambda (fun=140737488323568, nargs=nargs@entry=1, arg_vector=0x9a4a34 <pure+1343476>, arg_vector@entry=0x7fffffff8338) at ../../src/eval.c:2855
#22 0x0000000000565a4b in Ffuncall (nargs=2, args=args@entry=0x7fffffff8330) at ../../src/eval.c:2754
#23 0x0000000000565cec in run_hook_wrapped_funcall (nargs=<optimized out>, args=0x7fffffff8330)
    at ../../src/eval.c:2428
#24 0x0000000000563db5 in run_hook_with_args (nargs=2, args=0x7fffffff8330, funcall=
    0x565cd0 <run_hook_wrapped_funcall>) at ../../src/eval.c:2509
#25 0x0000000000565b59 in Ffuncall (nargs=3, args=args@entry=0x7fffffff8328) at ../../src/eval.c:2673
#26 0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=2, args=<optimized out>, args@entry=0x9a49b4 <pure+1343348>)
    at ../../src/bytecode.c:880
#27 0x0000000000565776 in funcall_lambda (fun=140737488324160, nargs=nargs@entry=2, arg_vector=0x9a49b4 <pure+1343348>, arg_vector@entry=0x7fffffff8540) at ../../src/eval.c:2855
#28 0x0000000000565a4b in Ffuncall (nargs=3, args=args@entry=0x7fffffff8538) at ../../src/eval.c:2754
#29 0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=2, args=<optimized out>, args@entry=0x9a4adc <pure+1343644>)
    at ../../src/bytecode.c:880
#30 0x0000000000565776 in funcall_lambda (fun=140737488324640, nargs=nargs@entry=2, arg_vector=0x9a4adc <pure+1343644>, arg_vector@entry=0x7fffffff8768) at ../../src/eval.c:2855
#31 0x0000000000565a4b in Ffuncall (nargs=3, args=args@entry=0x7fffffff8760) at ../../src/eval.c:2754
#32 0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=1, args=<optimized out>, args@entry=0x9a486c <pure+1343020>)
    at ../../src/bytecode.c:880
#33 0x0000000000565776 in funcall_lambda (fun=140737488340880, nargs=nargs@entry=1, arg_vector=0x9a486c <pure+1343020>, arg_vector@entry=0x7fffffff8968) at ../../src/eval.c:2855
#34 0x0000000000565a4b in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x7fffffff8960) at ../../src/eval.c:2754
#35 0x0000000000564516 in internal_condition_case_n (bfun=
    0x565850 <Ffuncall>, nargs=2, args=0x7fffffff8960, handlers=<optimized out>, hfun=0x43e280 <safe_eval_handler>)
    at ../../src/eval.c:1389
#36 0x000000000042efc8 in safe__call (inhibit_quit=inhibit_quit@entry=false, nargs=2, func=<optimized out>, ap=ap@entry=0x7fffffff89e0) at ../../src/xdisp.c:2558
#37 0x000000000043b97c in safe_call (nargs=<optimized out>, func=<optimized out>) at ../../src/xdisp.c:2574
#38 0x000000000043bab7 in handle_fontified_prop (it=0x7fffffff8c80) at ../../src/xdisp.c:2585
#39 0x00000000004400ca in handle_stop (it=0x7fffffff8c80) at ../../src/xdisp.c:3371
#40 0x0000000000463b74 in redisplay_window (window=<optimized out>, just_this_one_p=just_this_one_p@entry=false)
    at ../../src/xdisp.c:16740
#41 0x000000000046852b in redisplay_window_0 (window=window@entry=12851309) at ../../src/xdisp.c:14446
#42 0x00000000005643ee in internal_condition_case_1 (bfun=0x468500 <redisplay_window_0>, arg=12851309, handlers=<optimized out>, hfun=0x42d320 <redisplay_window_error>) at ../../src/eval.c:1333
#43 0x000000000043227d in redisplay_windows (window=12851309) at ../../src/xdisp.c:14426
#44 0x0000000000454dd9 in redisplay_internal () at ../../src/xdisp.c:13986
#45 0x0000000000456c8a in redisplay_preserve_echo_area (from_where=from_where@entry=2) at ../../src/xdisp.c:14279
#46 0x000000000041f0de in Fredisplay (force=0) at ../../src/dispnew.c:5791
#47 0x0000000000565c50 in Ffuncall (nargs=1, args=args@entry=0x7fffffffc710) at ../../src/eval.c:2693
#48 0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=1, args=<optimized out>, args@entry=0x87bdac <pure+127852>)
    at ../../src/bytecode.c:880
#49 0x0000000000565776 in funcall_lambda (fun=140737488341296, nargs=nargs@entry=1, arg_vector=0x87bdac <pure+127852>, arg_vector@entry=0x7fffffffc8b0) at ../../src/eval.c:2855
#50 0x0000000000565a4b in Ffuncall (nargs=2, args=args@entry=0x7fffffffc8a8) at ../../src/eval.c:2754
#51 0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=0, nargs=nargs@entry=0, args=<optimized out>, args@entry=0x0)
    at ../../src/bytecode.c:880
#52 0x000000000056564d in funcall_lambda (fun=10219317, nargs=nargs@entry=0, arg_vector=arg_vector@entry=0x7fffffffcac0) at ../../src/eval.c:2921
#53 0x0000000000565a4b in Ffuncall (nargs=1, args=args@entry=0x7fffffffcab8) at ../../src/eval.c:2754
#54 0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=0, nargs=nargs@entry=0, args=<optimized out>, args@entry=0x0)
    at ../../src/bytecode.c:880
#55 0x000000000056564d in funcall_lambda (fun=10179661, nargs=nargs@entry=0, arg_vector=arg_vector@entry=0x7fffffffccd0) at ../../src/eval.c:2921
#56 0x0000000000565a4b in Ffuncall (nargs=1, args=args@entry=0x7fffffffccc8) at ../../src/eval.c:2754
#57 0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=0, nargs=nargs@entry=0, args=<optimized out>, args@entry=0x0)
    at ../../src/bytecode.c:880
#58 0x000000000056564d in funcall_lambda (fun=10205973, nargs=nargs@entry=0, arg_vector=arg_vector@entry=0x7fffffffcee0) at ../../src/eval.c:2921
#59 0x0000000000565a4b in Ffuncall (nargs=1, args=args@entry=0x7fffffffced8) at ../../src/eval.c:2754
#60 0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=0, nargs=nargs@entry=0, args=<optimized out>, args@entry=0x0)
    at ../../src/bytecode.c:880
#61 0x000000000056564d in funcall_lambda (fun=10209589, nargs=nargs@entry=2, arg_vector=arg_vector@entry=0x7fffffffd0e0) at ../../src/eval.c:2921
#62 0x0000000000565a4b in Ffuncall (nargs=3, args=args@entry=0x7fffffffd0d8) at ../../src/eval.c:2754
#63 0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=0, nargs=nargs@entry=0, args=<optimized out>, args@entry=0x0)
    at ../../src/bytecode.c:880
#64 0x000000000056564d in funcall_lambda (fun=10209309, nargs=nargs@entry=2, arg_vector=arg_vector@entry=0x7fffffffd2f0) at ../../src/eval.c:2921
#65 0x0000000000565a4b in Ffuncall (nargs=3, args=args@entry=0x7fffffffd2e8) at ../../src/eval.c:2754
#66 0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=args_template@entry=0, nargs=nargs@entry=0, args=<optimized out>, args@entry=0x0)
    at ../../src/bytecode.c:880
#67 0x000000000056564d in funcall_lambda (fun=10209085, nargs=nargs@entry=2, arg_vector=arg_vector@entry=0x7fffffffd5c0) at ../../src/eval.c:2921
#68 0x0000000000565a4b in Ffuncall (nargs=nargs@entry=3, args=args@entry=0x7fffffffd5b8) at ../../src/eval.c:2754
#69 0x00000000005617aa in Ffuncall_interactively (nargs=3, args=0x7fffffffd5b8) at ../../src/callint.c:252
#70 0x0000000000565b59 in Ffuncall (nargs=nargs@entry=4, args=0x7fffffffd5b0) at ../../src/eval.c:2673
#71 0x0000000000566ec8 in Fapply (nargs=nargs@entry=3, args=args@entry=0x7fffffffd710) at ../../src/eval.c:2321
#72 0x0000000000561b2c in Fcall_interactively (function=9493328, record_flag=0, keys=<optimized out>)
    at ../../src/callint.c:389
#73 0x0000000000565c36 in Ffuncall (nargs=4, args=args@entry=0x7fffffffd848) at ../../src/eval.c:2700
#74 0x000000000059ad23 in exec_byte_code (bytestr=<optimized out>, vector=<optimized out>, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=1, args=<optimized out>, args@entry=0x936f7c <pure+894268>)
    at ../../src/bytecode.c:880
#75 0x0000000000565776 in funcall_lambda (fun=0, nargs=nargs@entry=1, arg_vector=0x936f7c <pure+894268>, 
    arg_vector@entry=0x7fffffffd9f8) at ../../src/eval.c:2855
#76 0x0000000000565a4b in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x7fffffffd9f0) at ../../src/eval.c:2754
#77 0x0000000000565d4a in call1 (fn=fn@entry=14880, arg1=<optimized out>) at ../../src/eval.c:2552
#78 0x00000000004ffd81 in command_loop_1 () at ../../src/keyboard.c:1479
#79 0x0000000000564362 in internal_condition_case (bfun=bfun@entry=0x4ff960 <command_loop_1>, handlers=handlers@entry=19152, hfun=hfun@entry=0x4f61e0 <cmd_error>) at ../../src/eval.c:1309
#80 0x00000000004f1614 in command_loop_2 (ignore=ignore@entry=0) at ../../src/keyboard.c:1107
#81 0x0000000000564303 in internal_catch (tag=tag@entry=45984, func=func@entry=0x4f15f0 <command_loop_2>, arg=arg@entry=0) at ../../src/eval.c:1074
#82 0x00000000004f15d0 in command_loop () at ../../src/keyboard.c:1086
#83 0x00000000004f5dd7 in recursive_edit_1 () at ../../src/keyboard.c:692
#84 0x00000000004f6128 in Frecursive_edit () at ../../src/keyboard.c:763
#85 0x0000000000419d52 in main (argc=3, argv=0x7fffffffddf8) at ../../src/emacs.c:1626


Version:
emacs-25.1-2.fc25.x86_64


Other information:

I have MALLOC_CHECK_ and MALLOC_PERTURB_ set:

MALLOC_CHECK_=2                                                                 
export MALLOC_CHECK_                                                            
                                                                                
MALLOC_PERTURB_=$(($RANDOM % 255 + 1))                                          
export MALLOC_PERTURB_

[rishi@kolache ~]$ env | grep MALLOC_
MALLOC_CHECK_=2
MALLOC_PERTURB_=190

Comment 1 Fedora End Of Life 2017-11-16 19:04:20 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2017-12-12 10:28:09 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.