Commit 0195809b authored by Eli Zaretskii's avatar Eli Zaretskii

Fix rare assertion violations in 'etags'

* lib-src/etags.c (pfnote): Instead of raising an assertion when
we get an empty tag name, return immediately.  (Bug#41465)

* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6: Adapt to latest changes in
etags.
parent cddb0079
Pipeline #5663 failed with stage
in 90 minutes and 2 seconds
......@@ -1984,8 +1984,11 @@ pfnote (char *name, bool is_func, char *linestart, ptrdiff_t linelen,
{
register node *np;
assert (name == NULL || name[0] != '\0');
if (CTAGS && name == NULL)
if ((CTAGS && name == NULL)
/* We used to have an assertion here for the case below, but if we hit
that case, it just means our parser got confused, and there's nothing
to do about such empty "tags". */
|| (!CTAGS && name && name[0] == '\0'))
return;
np = xnew (1, node);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment