diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2021-12-06 11:30:24 +0000 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2021-12-06 14:28:24 +0100 |
| commit | a5338d9cd2efcf914ba78edfe2615c7c0657b157 (patch) | |
| tree | b05d71e5ceac9986fb2414215fb714091745c79d /pkg/csource/generated.go | |
| parent | b18e90e04ac0c6a06518fc9469dc7d12d83db901 (diff) | |
executor: spread overlapping fds
There's a chance that the methods from common_bsd.h and common_linux.h
could dup2 (and thus close) an fd belonging to a kcov instance.
Prevent this by adjusting fd consts.
Diffstat (limited to 'pkg/csource/generated.go')
| -rw-r--r-- | pkg/csource/generated.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go index b914f3048..728806967 100644 --- a/pkg/csource/generated.go +++ b/pkg/csource/generated.go @@ -1757,7 +1757,7 @@ static void initialize_tun(int tun_id) return; #endif } - const int kTunFd = 240; + const int kTunFd = 200; if (dup2(tunfd, kTunFd) < 0) fail("dup2(tunfd, kTunFd) failed"); close(tunfd); @@ -2823,7 +2823,7 @@ static void initialize_tun(void) return; #endif } - const int kTunFd = 240; + const int kTunFd = 200; if (dup2(tunfd, kTunFd) < 0) fail("dup2(tunfd, kTunFd) failed"); close(tunfd); @@ -2875,7 +2875,7 @@ static void initialize_tun(void) #endif #if SYZ_EXECUTOR || __NR_syz_init_net_socket || SYZ_DEVLINK_PCI -const int kInitNetNsFd = 239; +const int kInitNetNsFd = 201; #endif #if SYZ_EXECUTOR || SYZ_DEVLINK_PCI || SYZ_NET_DEVICES @@ -5973,7 +5973,7 @@ static void initialize_vhci() vhci_fd = open("/dev/vhci", O_RDWR); if (vhci_fd == -1) fail("open /dev/vhci failed"); - const int kVhciFd = 241; + const int kVhciFd = 202; if (dup2(vhci_fd, kVhciFd) < 0) fail("dup2(vhci_fd, kVhciFd) failed"); close(vhci_fd); |
