ag 2 <(echo 2) gets assertion "p >= path" failed: .. /cygwin-3.1.7 ... /cygwin/path.cc", line 3065, function: int symlink_info::check

Ken Brown kbrown@cornell.edu
Sun Sep 6 20:28:40 GMT 2020


On 9/6/2020 3:47 PM, Ken Brown via Cygwin wrote:
> On 9/6/2020 2:43 PM, David Dyck via Cygwin wrote:
>> This command triggers an assertion failure
>>    "ag" is from the_silver_searcher
>>
>> $ ag 2 <(echo 2)
>> assertion "p >= path" failed: file
>> "/home/corinna/src/cygwin/cygwin-3.1.7/cygwin-3.1.7-1.x86_64/src/newlib-cygwin/winsup/cygwin/path.cc", 
>>
>> line 3065, function: int symlink_info::check(char*, const
>> suffix_info*, fs_info&, path_conv_handle&)
>> Aborted (core dumped)
>>
>>   3473k 2020/08/22 C:\cygwin64\bin\cygwin1.dll
>>      Cygwin DLL version info:
>>          DLL version: 3.1.7
>> bash                                    4.4.12-3                        OK
>> the_silver_searcher                     2.2.0-1                         OK
> [...]
>> assertion "p >= path" failed: file
>> "/home/corinna/src/cygwin/cygwin-3.1.7/cygwin-3.1.7-1.x86_64/src/newlib-cygwin/winsup/cygwin/path.cc", 
>>
>> line 3065, function: int symlink_info::check(char*, const
>> suffix_info*, fs_info&, path_conv_handle&)
>> Aborted (core dumped)
> [...]
>> I've reported this on github as an "ag" bug, but I think it is a bug in cygwin
> 
> An assertion failure in Cygwin code is a Cygwin bug.  I'll take a look.

Running

   bash -c '/usr/bin/ag 2 <(echo 2)'

under strace yields the following:

   242  191767 [main] ag 33659 open: open(/dev/fd/63/.ignore, 0x0)
[...]
    30  192584 [main] ag 33659 mount_info::conv_to_win32_path: src_path 
/proc/self/fd/63/.ignore, dst /proc/self/fd/63/.ignore, flags 0x0, rc 0
[...]
    31  193366 [main] ag 33659 mount_info::conv_to_win32_path: 
conv_to_win32_path (pipe:[4295036184]/.ignore)
[...]
    31  193550 [main] ag 33659 mount_info::conv_to_win32_path: 
conv_to_win32_path (pipe:[4295036184])
[...]
    34  193615 [main] ag 33659 symlink_info::check: 0xC0000034 = NtCreateFile 
(\??\C:pipe:[4295036184])

The assertion fails because the path 'C:pipe:[4295036184]' doesn't contain a 
backslash.  But probably we should never have allowed ourselves to get to the 
point of considering that path.

I don't have any more time to think about this today, but I'll get back to it 
tomorrow if no one beats me to it.

Ken


More information about the Cygwin mailing list