[Tarantool-patches] [PATCH] xlog: fix arguments processing in commit 8e429f4b7

Cyrill Gorcunov gorcunov at gmail.com
Fri Mar 5 11:26:13 MSK 2021


On Fri, Mar 05, 2021 at 11:16:01AM +0300, Aleksandr Lyapunov wrote:
> Hi! thanks for the patch!
> 
> Actually we found the error an fixed it in #5823.
> You can see identical commit 733081f7042974f8fee9431e46cd45d2f1601438 .
> But again thanks for your cooperation!

Aha! I see, thanks! You know the patch you merged in actually still buggy
---
+               } else {
+                       int rc = unlink(filename);
+                       xdir_say_gc(rc, errno, filename);
+
}

The compiler has all rights to fetch @errno _before_ evaluating_ unlink,
there is no dependency. We might need a barrier. My patch did

+			int rc = unlink(filename);
+			int _errno = rc != 0 ? errno : 0;
+			xdir_say_gc(rc, _errno, filename);

here is _errno depends on unlink with a purpose.


More information about the Tarantool-patches mailing list