Szpadel Posted April 1, 2014 Report Share Posted April 1, 2014 When Sync folder is under an symlinked directory btsync 1.3.77 crashes when starting with: *** Error in `./bin/btsync': free(): invalid next size (fast): 0x00007ffcf82c7670 ***======= Backtrace: =========/lib64/libc.so.6[0x33b4e7548e]/lib64/libc.so.6[0x33b4e7b1fd]/lib64/libc.so.6[0x33b4e7bf66]./bin/btsync[0x47643f]./bin/btsync[0x4d7264]./bin/btsync[0x4e10ef]./bin/btsync[0x4dfad3]./bin/btsync[0x4dffb5]./bin/btsync[0x46e50a]./bin/btsync[0x46e583]./bin/btsync[0x4d3b13]./bin/btsync[0x505758]./bin/btsync[0x491bfc]/lib64/libpthread.so.0[0x33b5608333]/lib64/libc.so.6(clone+0x6d)[0x33b4eeb26d] this configuration worked well with btsync 1.2.82 Loaded folder contains truncated path with real path /home is symlink to /home-bulkbtsync loading folder: /home-bulk/ziomek/Sync/La instead of /home/ziomek/Sync/Laptop Quote Link to comment Share on other sites More sharing options...
tuxpoldo Posted April 1, 2014 Report Share Posted April 1, 2014 Mhhh... int physlen = sizeof("/home/ziomek/Sync/Laptop");printf ("Physical Length is: %i\n", physlen);// Physical Length is: 25// ...think about the trailing 0 ("\0")// now resolve the link and write it to the same buffer or to a buffer of the same size...char *newstr = pseudo_resolve_link("/home/ziomek/Sync/Laptop")printf ("Real path: %s\n", newstr);// Real path: /home-bulk/ziomek/Sync/Laptopchar szTemp[256];memset (szTemp, 0, sizeof(szTemp));strncpy (szTemp, newstr, physlen);printf ("Et voila: %s\n", szTemp);// Et voila: /home-bulk/ziomek/Sync/Laprintf ("Length: %i\n", strlen(szTemp));// Length: 25// (the same as physlen)Maybe the symbolic link resolver does it in-place (and maybe overwrites also other memory?)... Quote Link to comment Share on other sites More sharing options...
Szpadel Posted April 2, 2014 Author Report Share Posted April 2, 2014 string length can change after link resolve, so you should calculate length after resolver Quote Link to comment Share on other sites More sharing options...
tuxpoldo Posted April 2, 2014 Report Share Posted April 2, 2014 Since the resolved is cut exactly at the physical length of the name of the symbolic link, I suppose that you are right. I think that the developers have added the resolving of symbolic links later, but forgot to allocate a new memory location for the result... Quote Link to comment Share on other sites More sharing options...
RomanZ Posted April 2, 2014 Report Share Posted April 2, 2014 Szpadel, Thanks for providing crash report. We've identified the root cause and will issue a fix shortly. Quote Link to comment Share on other sites More sharing options...
RomanZ Posted April 2, 2014 Report Share Posted April 2, 2014 Szpadel, Please try just released 1.3.80 - it has the fix for your crash. Quote Link to comment Share on other sites More sharing options...
Szpadel Posted April 2, 2014 Author Report Share Posted April 2, 2014 There is only update for windows, but this is Linux specific bug. Quote Link to comment Share on other sites More sharing options...
GreatMarko Posted April 3, 2014 Report Share Posted April 3, 2014 There is only update for windows, but this is Linux specific bug. Linux builds of Sync 1.3.80 are available - 1.3.80 isn't just for Windows! Quote Link to comment Share on other sites More sharing options...
Szpadel Posted April 3, 2014 Author Report Share Posted April 3, 2014 Seems be fixed for me Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.