Skip to content

Conversation

aanm
Copy link
Member

@aanm aanm commented Jan 13, 2016

Ping @tgraf

Signed-off-by: André Martins aanm90@gmail.com

Signed-off-by: André Martins <aanm90@gmail.com>
tgraf added a commit that referenced this pull request Jan 14, 2016
Preventing MapEndpointToNode from changing argument
@tgraf tgraf merged commit b3f2d75 into master Jan 14, 2016
@tgraf tgraf deleted the preventing-func-arg-change branch January 14, 2016 14:48
tgraf added a commit that referenced this pull request Jul 4, 2016
Preventing MapEndpointToNode from changing argument
tgraf pushed a commit that referenced this pull request Mar 17, 2017
@ashwinp ashwinp mentioned this pull request Sep 5, 2017
tgraf added a commit that referenced this pull request Jun 1, 2018
Signed-off-by: Thomas Graf <thomas@cilium.io>
tgraf added a commit that referenced this pull request Feb 4, 2019
When the allocation CIDR changes, the existing code errored out. When that
happened on the first agent restart, all existing endpoints failed to restore
due to failure to allocate the existing endpoint's IP address. The failure to
restore would then in turn get all existing endpoints deleted.

This is bad in two ways:

1. It causes all endpoints to be removed, causing the pods to restart
2. It does not allow the agent to ever come up again without intervention from
   the user.

This commit solves problem #2 to allow nodes to recover automatically. It does
not solve problem #1 yet and requires pods to restart.

Solving problem #2 only makes sense once we have isolated all datapath aspects
such as the DNS proxy and L7 proxies out of the agent as endpoint connetivity
cannot be guaranteed if the agent cannot come up within a reasonable amount of
time.

Fixes: #6215

Signed-off-by: Thomas Graf <thomas@cilium.io>
tgraf added a commit that referenced this pull request Feb 4, 2019
When the allocation CIDR changes, the existing code errored out. When that
happened on the first agent restart, all existing endpoints failed to restore
due to failure to allocate the existing endpoint's IP address. The failure to
restore would then in turn get all existing endpoints deleted.

This is bad in two ways:

1. It causes all endpoints to be removed, causing the pods to restart
2. It does not allow the agent to ever come up again without intervention from
   the user.

This commit solves problem #2 to allow nodes to recover automatically. It does
not solve problem #1 yet and requires pods to restart.

Solving problem #2 only makes sense once we have isolated all datapath aspects
such as the DNS proxy and L7 proxies out of the agent as endpoint connetivity
cannot be guaranteed if the agent cannot come up within a reasonable amount of
time.

Fixes: #6215

Signed-off-by: Thomas Graf <thomas@cilium.io>
ianvernon pushed a commit that referenced this pull request Feb 4, 2019
[ upstream commit 0b3ed95 ]

When the allocation CIDR changes, the existing code errored out. When that
happened on the first agent restart, all existing endpoints failed to restore
due to failure to allocate the existing endpoint's IP address. The failure to
restore would then in turn get all existing endpoints deleted.

This is bad in two ways:

1. It causes all endpoints to be removed, causing the pods to restart
2. It does not allow the agent to ever come up again without intervention from
   the user.

This commit solves problem #2 to allow nodes to recover automatically. It does
not solve problem #1 yet and requires pods to restart.

Solving problem #2 only makes sense once we have isolated all datapath aspects
such as the DNS proxy and L7 proxies out of the agent as endpoint connetivity
cannot be guaranteed if the agent cannot come up within a reasonable amount of
time.

Fixes: #6215

Signed-off-by: Thomas Graf <thomas@cilium.io>
Signed-off-by: Ian Vernon <ian@cilium.io>
ianvernon pushed a commit that referenced this pull request Feb 4, 2019
[ upstream commit 0b3ed95 ]

When the allocation CIDR changes, the existing code errored out. When that
happened on the first agent restart, all existing endpoints failed to restore
due to failure to allocate the existing endpoint's IP address. The failure to
restore would then in turn get all existing endpoints deleted.

This is bad in two ways:

1. It causes all endpoints to be removed, causing the pods to restart
2. It does not allow the agent to ever come up again without intervention from
   the user.

This commit solves problem #2 to allow nodes to recover automatically. It does
not solve problem #1 yet and requires pods to restart.

Solving problem #2 only makes sense once we have isolated all datapath aspects
such as the DNS proxy and L7 proxies out of the agent as endpoint connetivity
cannot be guaranteed if the agent cannot come up within a reasonable amount of
time.

Fixes: #6215

Signed-off-by: Thomas Graf <thomas@cilium.io>
Signed-off-by: Ian Vernon <ian@cilium.io>
@Cyrus008 Cyrus008 mentioned this pull request May 4, 2021
vakalapa added a commit to vakalapa/cilium that referenced this pull request Jul 24, 2023
# This is the 1st commit message:

chore: fixing empty pod fields in endpoint logger

Signed-off-by: vakr <vakr@microsoft.com>

# This is the commit message cilium#2:

Correcting comment

Signed-off-by: vakr <vakr@microsoft.com>
mhofstetter added a commit to mhofstetter/cilium that referenced this pull request Aug 29, 2023
Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
ruicao93 referenced this pull request in volcengine/cilium Mar 27, 2024
Signed-off-by: Rui Cao <caorui.io@bytedance.com>
rectified95 referenced this pull request in rectified95/cilium Aug 19, 2024
Signed-off-by: Igor Klemenski <igor.klemenski@microsoft.com>
mhofstetter added a commit to mhofstetter/cilium that referenced this pull request Feb 19, 2025
Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
mhofstetter added a commit to mhofstetter/cilium that referenced this pull request Feb 19, 2025
Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
msune added a commit to msune/cilium that referenced this pull request Aug 11, 2025
Running all memmove tests in a single function made clang backend
crash (`Branch target out of insn range`).

It doesn't seem to correlate with a single test. Commenting from test
everything after:

```
test___builtin_memmove5_single(48);
```

Makes the test compile and pass. Inverting the selection, and only running
`test___builtin_memmove5_single(50);` to `test___builtin_memmove5_single(128);`
also makes the test compile & pass.

Split `test_builtin_memmove` into two to work-around.

Note: Unsure how we can report this to CLANG in a simple repro, given that it
seems to be "additive".

---

Details:

```
fatal error: error in backend: Branch target out of insn range
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: clang -I/home/user/dev/cilium2/bpf -I/home/user/dev/cilium2/bpf/include -g -O2 --target=bpf -std=gnu99 -nostdinc -ftrap-function=__undefined_trap -Wall -Wextra -Werror -Wshadow -Wno-address-of-packed-member -Wno-unknown-warning-option -Wno-gnu-variable-sized-type-not-at-end -Wimplicit-int-conversion -Wenum-conversion -Wimplicit-fallthrough -MD -mcpu=v3 -c builtins.c -o builtins.o
1.	<eof> parser at end of file
2.	Code generation
 #0 0x00007211191a63bf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Unix/Signals.inc:723:13
 cilium#1 0x00007211191a44f9 llvm::sys::RunSignalHandlers() build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Signals.cpp:106:18
 cilium#2 0x00007211190efff3 build-llvm/tools/clang/stage2-bins/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 cilium#3 0x00007211190effa2 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xceffa2)
 cilium#4 0x00007211191a0c70 llvm::sys::Process::Exit(int, bool) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Process.cpp:102:5
 cilium#5 0x000055d222d2891b (/usr/lib/llvm-18/bin/clang+0x1491b)
 cilium#6 0x00007211190fe01c _M_data /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:223:28
 cilium#7 0x00007211190fe01c _M_is_local /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:264:6
 cilium#8 0x00007211190fe01c _M_dispose /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:282:7
 cilium#9 0x00007211190fe01c ~basic_string /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:804:9
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Ubuntu clang version 18.1.3 (1ubuntu1)
Target: bpf
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/builtins-eae2ef.c
clang: note: diagnostic msg: /tmp/builtins-eae2ef.sh
clang: note: diagnostic msg:

********************
```

Signed-off-by: Marc Suñé <marc.sune@isovalent.com>
msune added a commit to msune/cilium that referenced this pull request Aug 11, 2025
Running all memmove tests in a single function made clang backend
crash (`Branch target out of insn range`).

It doesn't seem to correlate with a single test. Commenting from test
everything after:

```
test___builtin_memmove5_single(48);
```

Makes the test compile and pass. Inverting the selection, and only running
`test___builtin_memmove5_single(50);` to `test___builtin_memmove5_single(128);`
also makes the test compile & pass.

Split `test_builtin_memmove` into two to work-around.

Note: Unsure how we can report this to CLANG in a simple repro, given that it
seems to be "additive".

---

Details:

```
fatal error: error in backend: Branch target out of insn range
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: clang -I/home/user/dev/cilium2/bpf -I/home/user/dev/cilium2/bpf/include -g -O2 --target=bpf -std=gnu99 -nostdinc -ftrap-function=__undefined_trap -Wall -Wextra -Werror -Wshadow -Wno-address-of-packed-member -Wno-unknown-warning-option -Wno-gnu-variable-sized-type-not-at-end -Wimplicit-int-conversion -Wenum-conversion -Wimplicit-fallthrough -MD -mcpu=v3 -c builtins.c -o builtins.o
1.	<eof> parser at end of file
2.	Code generation
 #0 0x00007211191a63bf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Unix/Signals.inc:723:13
 cilium#1 0x00007211191a44f9 llvm::sys::RunSignalHandlers() build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Signals.cpp:106:18
 cilium#2 0x00007211190efff3 build-llvm/tools/clang/stage2-bins/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 cilium#3 0x00007211190effa2 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xceffa2)
 cilium#4 0x00007211191a0c70 llvm::sys::Process::Exit(int, bool) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Process.cpp:102:5
 cilium#5 0x000055d222d2891b (/usr/lib/llvm-18/bin/clang+0x1491b)
 cilium#6 0x00007211190fe01c _M_data /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:223:28
 cilium#7 0x00007211190fe01c _M_is_local /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:264:6
 cilium#8 0x00007211190fe01c _M_dispose /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:282:7
 cilium#9 0x00007211190fe01c ~basic_string /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:804:9
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Ubuntu clang version 18.1.3 (1ubuntu1)
Target: bpf
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/builtins-eae2ef.c
clang: note: diagnostic msg: /tmp/builtins-eae2ef.sh
clang: note: diagnostic msg:

********************
```

Signed-off-by: Marc Suñé <marc.sune@isovalent.com>
msune added a commit to msune/cilium that referenced this pull request Aug 11, 2025
Running all memmove tests in a single function made clang backend
crash (`Branch target out of insn range`).

It doesn't seem to correlate with a single test. Commenting from test
everything after:

```
test___builtin_memmove5_single(48);
```

Makes the test compile and pass. Inverting the selection, and only running
`test___builtin_memmove5_single(50);` to `test___builtin_memmove5_single(128);`
also makes the test compile & pass.

Split `test_builtin_memmove` into two to work-around.

Note: Unsure how we can report this to CLANG in a simple repro, given that it
seems to be "additive".

---

Details:

```
fatal error: error in backend: Branch target out of insn range
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: clang -I/home/user/dev/cilium2/bpf -I/home/user/dev/cilium2/bpf/include -g -O2 --target=bpf -std=gnu99 -nostdinc -ftrap-function=__undefined_trap -Wall -Wextra -Werror -Wshadow -Wno-address-of-packed-member -Wno-unknown-warning-option -Wno-gnu-variable-sized-type-not-at-end -Wimplicit-int-conversion -Wenum-conversion -Wimplicit-fallthrough -MD -mcpu=v3 -c builtins.c -o builtins.o
1.	<eof> parser at end of file
2.	Code generation
 #0 0x00007211191a63bf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Unix/Signals.inc:723:13
 cilium#1 0x00007211191a44f9 llvm::sys::RunSignalHandlers() build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Signals.cpp:106:18
 cilium#2 0x00007211190efff3 build-llvm/tools/clang/stage2-bins/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 cilium#3 0x00007211190effa2 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xceffa2)
 cilium#4 0x00007211191a0c70 llvm::sys::Process::Exit(int, bool) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Process.cpp:102:5
 cilium#5 0x000055d222d2891b (/usr/lib/llvm-18/bin/clang+0x1491b)
 cilium#6 0x00007211190fe01c _M_data /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:223:28
 cilium#7 0x00007211190fe01c _M_is_local /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:264:6
 cilium#8 0x00007211190fe01c _M_dispose /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:282:7
 cilium#9 0x00007211190fe01c ~basic_string /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:804:9
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Ubuntu clang version 18.1.3 (1ubuntu1)
Target: bpf
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/builtins-eae2ef.c
clang: note: diagnostic msg: /tmp/builtins-eae2ef.sh
clang: note: diagnostic msg:

********************
```

Signed-off-by: Marc Suñé <marc.sune@isovalent.com>
msune added a commit to msune/cilium that referenced this pull request Aug 13, 2025
Running all memmove tests in a single function made clang backend
crash (`Branch target out of insn range`).

It doesn't seem to correlate with a single test. Commenting from test
everything after:

```
test___builtin_memmove5_single(48);
```

Makes the test compile and pass. Inverting the selection, and only running
`test___builtin_memmove5_single(50);` to `test___builtin_memmove5_single(128);`
also makes the test compile & pass.

Split `test_builtin_memmove` into two to work-around.

Note: Unsure how we can report this to CLANG in a simple repro, given that it
seems to be "additive".

---

Details:

```
fatal error: error in backend: Branch target out of insn range
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: clang -I/home/user/dev/cilium2/bpf -I/home/user/dev/cilium2/bpf/include -g -O2 --target=bpf -std=gnu99 -nostdinc -ftrap-function=__undefined_trap -Wall -Wextra -Werror -Wshadow -Wno-address-of-packed-member -Wno-unknown-warning-option -Wno-gnu-variable-sized-type-not-at-end -Wimplicit-int-conversion -Wenum-conversion -Wimplicit-fallthrough -MD -mcpu=v3 -c builtins.c -o builtins.o
1.	<eof> parser at end of file
2.	Code generation
 #0 0x00007211191a63bf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Unix/Signals.inc:723:13
 cilium#1 0x00007211191a44f9 llvm::sys::RunSignalHandlers() build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Signals.cpp:106:18
 cilium#2 0x00007211190efff3 build-llvm/tools/clang/stage2-bins/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 cilium#3 0x00007211190effa2 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xceffa2)
 cilium#4 0x00007211191a0c70 llvm::sys::Process::Exit(int, bool) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Process.cpp:102:5
 cilium#5 0x000055d222d2891b (/usr/lib/llvm-18/bin/clang+0x1491b)
 cilium#6 0x00007211190fe01c _M_data /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:223:28
 cilium#7 0x00007211190fe01c _M_is_local /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:264:6
 cilium#8 0x00007211190fe01c _M_dispose /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:282:7
 cilium#9 0x00007211190fe01c ~basic_string /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:804:9
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Ubuntu clang version 18.1.3 (1ubuntu1)
Target: bpf
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/builtins-eae2ef.c
clang: note: diagnostic msg: /tmp/builtins-eae2ef.sh
clang: note: diagnostic msg:

********************
```

Signed-off-by: Marc Suñé <marc.sune@isovalent.com>
msune added a commit to msune/cilium that referenced this pull request Aug 14, 2025
Running all memmove tests in a single function made clang backend
crash (`Branch target out of insn range`).

It doesn't seem to correlate with a single test. Commenting from test
everything after:

```
test___builtin_memmove5_single(48);
```

Makes the test compile and pass. Inverting the selection, and only running
`test___builtin_memmove5_single(50);` to `test___builtin_memmove5_single(128);`
also makes the test compile & pass.

Split `test_builtin_memmove` into two to work-around.

Note: Unsure how we can report this to CLANG in a simple repro, given that it
seems to be "additive".

---

Details:

```
fatal error: error in backend: Branch target out of insn range
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: clang -I/home/user/dev/cilium2/bpf -I/home/user/dev/cilium2/bpf/include -g -O2 --target=bpf -std=gnu99 -nostdinc -ftrap-function=__undefined_trap -Wall -Wextra -Werror -Wshadow -Wno-address-of-packed-member -Wno-unknown-warning-option -Wno-gnu-variable-sized-type-not-at-end -Wimplicit-int-conversion -Wenum-conversion -Wimplicit-fallthrough -MD -mcpu=v3 -c builtins.c -o builtins.o
1.	<eof> parser at end of file
2.	Code generation
 #0 0x00007211191a63bf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Unix/Signals.inc:723:13
 cilium#1 0x00007211191a44f9 llvm::sys::RunSignalHandlers() build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Signals.cpp:106:18
 cilium#2 0x00007211190efff3 build-llvm/tools/clang/stage2-bins/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 cilium#3 0x00007211190effa2 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xceffa2)
 cilium#4 0x00007211191a0c70 llvm::sys::Process::Exit(int, bool) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Process.cpp:102:5
 cilium#5 0x000055d222d2891b (/usr/lib/llvm-18/bin/clang+0x1491b)
 cilium#6 0x00007211190fe01c _M_data /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:223:28
 cilium#7 0x00007211190fe01c _M_is_local /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:264:6
 cilium#8 0x00007211190fe01c _M_dispose /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:282:7
 cilium#9 0x00007211190fe01c ~basic_string /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:804:9
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Ubuntu clang version 18.1.3 (1ubuntu1)
Target: bpf
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/builtins-eae2ef.c
clang: note: diagnostic msg: /tmp/builtins-eae2ef.sh
clang: note: diagnostic msg:

********************
```

Signed-off-by: Marc Suñé <marc.sune@isovalent.com>
msune added a commit to msune/cilium that referenced this pull request Aug 14, 2025
Running all memmove tests in a single function made clang backend
crash (`Branch target out of insn range`).

It doesn't seem to correlate with a single test. Commenting from test
everything after:

```
test___builtin_memmove5_single(48);
```

Makes the test compile and pass. Inverting the selection, and only running
`test___builtin_memmove5_single(50);` to `test___builtin_memmove5_single(128);`
also makes the test compile & pass.

Split `test_builtin_memmove` into two to work-around.

Note: Unsure how we can report this to CLANG in a simple repro, given that it
seems to be "additive".

---

Details:

```
fatal error: error in backend: Branch target out of insn range
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: clang -I/home/user/dev/cilium2/bpf -I/home/user/dev/cilium2/bpf/include -g -O2 --target=bpf -std=gnu99 -nostdinc -ftrap-function=__undefined_trap -Wall -Wextra -Werror -Wshadow -Wno-address-of-packed-member -Wno-unknown-warning-option -Wno-gnu-variable-sized-type-not-at-end -Wimplicit-int-conversion -Wenum-conversion -Wimplicit-fallthrough -MD -mcpu=v3 -c builtins.c -o builtins.o
1.	<eof> parser at end of file
2.	Code generation
 #0 0x00007211191a63bf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Unix/Signals.inc:723:13
 cilium#1 0x00007211191a44f9 llvm::sys::RunSignalHandlers() build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Signals.cpp:106:18
 cilium#2 0x00007211190efff3 build-llvm/tools/clang/stage2-bins/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 cilium#3 0x00007211190effa2 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xceffa2)
 cilium#4 0x00007211191a0c70 llvm::sys::Process::Exit(int, bool) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Process.cpp:102:5
 cilium#5 0x000055d222d2891b (/usr/lib/llvm-18/bin/clang+0x1491b)
 cilium#6 0x00007211190fe01c _M_data /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:223:28
 cilium#7 0x00007211190fe01c _M_is_local /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:264:6
 cilium#8 0x00007211190fe01c _M_dispose /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:282:7
 cilium#9 0x00007211190fe01c ~basic_string /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:804:9
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Ubuntu clang version 18.1.3 (1ubuntu1)
Target: bpf
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/builtins-eae2ef.c
clang: note: diagnostic msg: /tmp/builtins-eae2ef.sh
clang: note: diagnostic msg:

********************
```

Signed-off-by: Marc Suñé <marc.sune@isovalent.com>
github-merge-queue bot pushed a commit that referenced this pull request Aug 14, 2025
Running all memmove tests in a single function made clang backend
crash (`Branch target out of insn range`).

It doesn't seem to correlate with a single test. Commenting from test
everything after:

```
test___builtin_memmove5_single(48);
```

Makes the test compile and pass. Inverting the selection, and only running
`test___builtin_memmove5_single(50);` to `test___builtin_memmove5_single(128);`
also makes the test compile & pass.

Split `test_builtin_memmove` into two to work-around.

Note: Unsure how we can report this to CLANG in a simple repro, given that it
seems to be "additive".

---

Details:

```
fatal error: error in backend: Branch target out of insn range
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: clang -I/home/user/dev/cilium2/bpf -I/home/user/dev/cilium2/bpf/include -g -O2 --target=bpf -std=gnu99 -nostdinc -ftrap-function=__undefined_trap -Wall -Wextra -Werror -Wshadow -Wno-address-of-packed-member -Wno-unknown-warning-option -Wno-gnu-variable-sized-type-not-at-end -Wimplicit-int-conversion -Wenum-conversion -Wimplicit-fallthrough -MD -mcpu=v3 -c builtins.c -o builtins.o
1.	<eof> parser at end of file
2.	Code generation
 #0 0x00007211191a63bf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Unix/Signals.inc:723:13
 #1 0x00007211191a44f9 llvm::sys::RunSignalHandlers() build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Signals.cpp:106:18
 #2 0x00007211190efff3 build-llvm/tools/clang/stage2-bins/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 #3 0x00007211190effa2 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xceffa2)
 #4 0x00007211191a0c70 llvm::sys::Process::Exit(int, bool) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Process.cpp:102:5
 #5 0x000055d222d2891b (/usr/lib/llvm-18/bin/clang+0x1491b)
 #6 0x00007211190fe01c _M_data /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:223:28
 #7 0x00007211190fe01c _M_is_local /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:264:6
 #8 0x00007211190fe01c _M_dispose /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:282:7
 #9 0x00007211190fe01c ~basic_string /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:804:9
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Ubuntu clang version 18.1.3 (1ubuntu1)
Target: bpf
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/builtins-eae2ef.c
clang: note: diagnostic msg: /tmp/builtins-eae2ef.sh
clang: note: diagnostic msg:

********************
```

Signed-off-by: Marc Suñé <marc.sune@isovalent.com>
rabelmervin pushed a commit to rabelmervin/cilium that referenced this pull request Aug 18, 2025
Running all memmove tests in a single function made clang backend
crash (`Branch target out of insn range`).

It doesn't seem to correlate with a single test. Commenting from test
everything after:

```
test___builtin_memmove5_single(48);
```

Makes the test compile and pass. Inverting the selection, and only running
`test___builtin_memmove5_single(50);` to `test___builtin_memmove5_single(128);`
also makes the test compile & pass.

Split `test_builtin_memmove` into two to work-around.

Note: Unsure how we can report this to CLANG in a simple repro, given that it
seems to be "additive".

---

Details:

```
fatal error: error in backend: Branch target out of insn range
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: clang -I/home/user/dev/cilium2/bpf -I/home/user/dev/cilium2/bpf/include -g -O2 --target=bpf -std=gnu99 -nostdinc -ftrap-function=__undefined_trap -Wall -Wextra -Werror -Wshadow -Wno-address-of-packed-member -Wno-unknown-warning-option -Wno-gnu-variable-sized-type-not-at-end -Wimplicit-int-conversion -Wenum-conversion -Wimplicit-fallthrough -MD -mcpu=v3 -c builtins.c -o builtins.o
1.	<eof> parser at end of file
2.	Code generation
 #0 0x00007211191a63bf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Unix/Signals.inc:723:13
 cilium#1 0x00007211191a44f9 llvm::sys::RunSignalHandlers() build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Signals.cpp:106:18
 cilium#2 0x00007211190efff3 build-llvm/tools/clang/stage2-bins/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
 cilium#3 0x00007211190effa2 (/usr/lib/llvm-18/bin/../lib/libLLVM.so.18.1+0xceffa2)
 cilium#4 0x00007211191a0c70 llvm::sys::Process::Exit(int, bool) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Process.cpp:102:5
 cilium#5 0x000055d222d2891b (/usr/lib/llvm-18/bin/clang+0x1491b)
 cilium#6 0x00007211190fe01c _M_data /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:223:28
 cilium#7 0x00007211190fe01c _M_is_local /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:264:6
 cilium#8 0x00007211190fe01c _M_dispose /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:282:7
 cilium#9 0x00007211190fe01c ~basic_string /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:804:9
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Ubuntu clang version 18.1.3 (1ubuntu1)
Target: bpf
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/builtins-eae2ef.c
clang: note: diagnostic msg: /tmp/builtins-eae2ef.sh
clang: note: diagnostic msg:

********************
```

Signed-off-by: Marc Suñé <marc.sune@isovalent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants