Print

Print


https://github.com/xrootd/xrootd/blob/de935309f2c797cdd3c31d70537e5409707d5d43/src/XrdOuc/XrdOucString.cc#L733

replace(...) method on some strings triggers "SEGV signal caused by a WRITE memory access".

For example:
XrdOucString good_s {"aaa"}; 
good_s.replace("a","xa"} // no problem

// But
XrdOucString bad_s {"aaaa"};
bad_s.replace("a","xa"} // SEGV on write

// Anyway
XrdOucString another_good_s {"abaa"};
bad_s.replace("a","xa"} // no problem 

Trying with a few other sample strings, it looks like there is a pattern with "faulty strings" being longer than 4 chars and with 2 equal starting characters. 
( Just an hint, it has not been rigorously proven though ).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/issues/1094

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1