[Bug 51438] Rust compiler crashes with "free(): double free detected in tcache 2" message

WineHQ Bugzilla wine-bugs at winehq.org
Mon Jul 12 14:35:40 CDT 2021


https://bugs.winehq.org/show_bug.cgi?id=51438

--- Comment #6 from Erich E. Hoover <erich.e.hoover at gmail.com> ---
(In reply to Zebediah Figura from comment #5)
> Erich, could you please take a look?

Yup, it appears that there I lost something in a rebase:
===
@@ -2605,10 +2623,10 @@ static void set_fd_name( struct fd *fd, struct fd
*root, const char *nameptr, da

     free( fd->nt_name );
     fd->nt_name = dup_nt_name( root, nt_name, &fd->nt_namelen );
+    free( fd->unlink_name );
     free( fd->unix_name );
     fd->closed->unix_name = fd->unix_name = realpath( name, NULL );
-    free( name );
-    if (!fd->unix_name)
+    if (!fd->unlink_name || !fd->unix_name)
         set_error( STATUS_NO_MEMORY );
     return;
===
^^ This should also have the line:
fd->closed->unlink_name = fd->unlink_name = name;

Rafał, would you mind adding this line and giving it a try?

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list