You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Line 322 need to add one line " *ptr = dest; " to keep *ptr with the same value of *saveptr in glibc __strtok_r.
I found strtok_s() leads to an endless loop while running hmmio.c (Line 1411-1415) in hmmer of SPEC 2006. Using gdb to check it I found the *ptr remains the same value while glibc not.
The trick is that when we cannot find delimiter in src we have to point the *ptr to the end of dest,while in strtok_s *ptr points to the start.
Line 322 need to add one line " *ptr = dest; " to keep *ptr with the same value of *saveptr in glibc __strtok_r.
I found strtok_s() leads to an endless loop while running hmmio.c (Line 1411-1415) in hmmer of SPEC 2006. Using gdb to check it I found the *ptr remains the same value while glibc not.
The trick is that when we cannot find delimiter in src we have to point the *ptr to the end of dest,while in strtok_s *ptr points to the start.
hmmio.c source code:
while (sptr != NULL) { fprintf(fp, "%s%s\n", pfx, sptr); sptr = strtok(NULL, "\n"); }
__strtok_r in glibc : https://github.com/lattera/glibc/blob/master/string/strtok_r.c
The text was updated successfully, but these errors were encountered: