bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Allow for case-insensitive context search if option --ignore


From: Hideki IWAMOTO
Subject: Re: [PATCH] Allow for case-insensitive context search if option --ignore-case is given
Date: Fri, 03 Mar 2017 19:14:40 +0900

Hi.

Your patch includes use-after-free.

$ ef global -i -x --from-here 383:global/global.c main

  Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <address@hidden>
main               86 global/global.c  int main(int, char **);
main               62 gozilla/gozilla.c int main(int, char **);
main               72 gtags/gtags.c    int main(int, char **);
$ ef global -i -x --from-here 383:global/global.c Main

  Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <address@hidden>
/usr/bin/ef: line 20: 10847 Segmentation fault      (core dumped) ( export 
LD_PRELOAD=libefence.so.0.0; exec $* )
$ gdb -q global core.10847
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `global -i -x --from-here 383 global/global.c Main'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib64/libefence.so.0.0...done.
Loaded symbols for /usr/lib64/libefence.so.0.0
Reading symbols from /lib64/libdl.so.2...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libc.so.6...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
#0  main (argc=Variable "argc" is not available.
) at global.c:854
854                                     db = decide_tag_by_context(gtp->tag, 
context_file, atoi(context_lineno));

On Fri, 3 Mar 2017 00:19:16 +0100
Fabian Wiget <address@hidden> wrote:

> Hi everybody
> 
> If the option --from-here is specified, the resulting search by context is
> always case-sensitive even if the option --ignore-case is present.
> 
> Example:
> 
> // will find your main function
> global --from-here=25:/path/to/file.c main
> 
> // won't find your main function
> global --from-here=25:/path/to/file.c -i Main
> 
> The attached patch fixes this issue.
> 
> Thank you & best regards
> fabian

-- 
Hideki IWAMOTO <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]