-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New instance of -Wframe-larger-than with sanitizers enabled after commit d2408c417cfa #111903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Tentatively marking this as an issue in the AArch64 backend (since I still have not seen this with other architectures) for visibility, if that is incorrect, feel free to adjust it. |
@llvm/issue-subscribers-backend-aarch64 Author: Nathan Chancellor (nathanchance)
I see a new instance of `-Wframe-larger-than` when building the Linux kernel's `allmodconfig` target (which enables several sanitizers) for arm64, which I bisected to commit [d2408c4](https://github.com/llvm/llvm-project/commit/d2408c417cfa71f1786c909788560374eb1aca96) ("[InstCombine] Canonicalize more geps with constant gep bases and constant offsets. (#110033)") (also [reported on our mailing list](https://lore.kernel.org/llvm/[email protected]/) by the Linaro toolchain test infrastructure):
At the parent commit 45b526afa26e ("[LV] Honor uniform-after-vectorization in setVectorizedCallDecision."), the usage is much lower.
I reduced this file with struct v4l2_vp9_frame_symbol_counts {
int (*coeff[4][2][2][6][6])[];
int *eob[][2][2][6][6][2];
} *vdec_vp9_slice_update_prob_counts_helper;
struct vdec_vp9_slice_frame_counts {
struct {
int band_1_5[5][6];
} eob_branch[4][2][2];
struct {
int band_1_5[5][6][4];
} coef_probs[4][2][2];
int class0_fp;
} vdec_vp9_slice_counts_map_helper_counts;
struct {
int frame_ctx_helper;
struct v4l2_vp9_frame_symbol_counts counts_helper;
} *vdec_vp9_slice_update_prob_instance;
static void vdec_vp9_slice_map_counts_eob_coef(
int i, int j, int k, struct vdec_vp9_slice_frame_counts *counts,
struct v4l2_vp9_frame_symbol_counts *counts_helper) {
int l, m;
for (l = 1; l < 6; l++)
for (m = 0; m < 6; m++) {
counts_helper->coeff[i][j][k][l][m] = (int(*)[])counts;
counts_helper->eob[i][j][k][l][m][0] =
&counts->eob_branch[i][j][k].band_1_5[1][m];
counts_helper->eob[i][j][k][l][m][1] =
&counts->coef_probs[i][j][k].band_1_5[1][m][3];
}
}
static void vdec_vp9_slice_counts_map_helper(
struct v4l2_vp9_frame_symbol_counts *counts_helper) {
int i, j, k;
for (i = 0; i < 4; i++)
for (j = 0; j < 2; j++)
for (k = 0; k < 2; k++)
vdec_vp9_slice_map_counts_eob_coef(
i, j, k, &vdec_vp9_slice_counts_map_helper_counts, counts_helper);
}
int vdec_vp9_slice_update_prob() {
vdec_vp9_slice_update_prob_counts_helper =
&vdec_vp9_slice_update_prob_instance->counts_helper;
vdec_vp9_slice_counts_map_helper(vdec_vp9_slice_update_prob_counts_helper);
return 0;
} which results in the following behavior with GCC 14.2.0 and clang at the revisions mentioned above.
This is reminiscent of a downstream issue I filed for a warning in the same code with cc @davemgreen @nikic |
As there has been no movement on the upstream report [1], apply Arnd's workaround, which I have requested to be applied [2]. Link: llvm/llvm-project#111903 [1] Link: https://lore.kernel.org/20241118200641.GA768549@thelio-3990X/ [2] Signed-off-by: Nathan Chancellor <[email protected]>
I see a new instance of
-Wframe-larger-than
when building the Linux kernel'sallmodconfig
target (which enables several sanitizers) for arm64, which I bisected to commit d2408c417cfa ("[InstCombine] Canonicalize more geps with constant gep bases and constant offsets. (#110033)") (also reported on our mailing list by the Linaro toolchain test infrastructure):At the parent commit 45b526afa26e ("[LV] Honor uniform-after-vectorization in setVectorizedCallDecision."), the usage is much lower.
I reduced this file with
cvise
:which results in the following behavior with GCC 14.2.0 and clang at the revisions mentioned above.
This is reminiscent of a downstream issue I filed for a warning in the same code with
ARCH=loongarch
(ClangBuiltLinux/linux#2014), which resulted in some fixes in the LoongArch backend (0822780, 8e4b089). Perhaps AArch64 needs similar changes?cc @davemgreen @nikic
The text was updated successfully, but these errors were encountered: