From: Anton Johansson via <qemu-devel@nongnu.org>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: Peter Maydell <peter.maydell@linaro.org>, pbonzini@redhat.com
Subject: Help finding Coverity defects for generated Hexagon code
Date: Mon, 22 May 2023 22:24:22 +0200 [thread overview]
Message-ID: <4ffdd486-ec7d-49c7-1330-0d0b090735b9@rev.ng> (raw)
In-Reply-To: <6467d9133bd9f_57b172b16e2c9d98835043@prd-scan-dashboard-0.mail>
[-- Attachment #1: Type: text/plain, Size: 559 bytes --]
Hi,
coverity recently reported some defects in code generated by idef-parser
(email attached). These defects are expected and we plan to emit a
/* coverity[event_tag] */ comment to disable the specific event triggered.
However, I'm not able to find the event_tag as I can't find the defect in
the QEMU coverity project, and the link in the email simply brings me
to the main project page. I've tried sorting through the defects and
searching for the CID without luck.
Any ideas? I'm not super familiar with coverity.
--
Anton Johansson,
rev.ng Labs Srl.
[-- Attachment #2: New Defects reported by Coverity Scan for QEMU.eml --]
[-- Type: message/rfc822, Size: 11616 bytes --]
From: scan-admin@coverity.com
To: anjo@rev.ng
Subject: New Defects reported by Coverity Scan for QEMU
Date: Fri, 19 May 2023 20:16:19 +0000 (UTC)
Message-ID: <6467d9133bd9f_57b172b16e2c9d98835043@prd-scan-dashboard-0.mail>
Hi,
Please find the latest report on new defect(s) introduced to QEMU found with Coverity Scan.
5 new defect(s) introduced to QEMU found with Coverity Scan.
9 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 5 of 5 defect(s)
** CID 1512512: Control flow issues (DEADCODE)
/target/hexagon/idef-generated-emitter.indented.c: 32297 in emit_F2_dfmpylh()
________________________________________________________________________________________________________
*** CID 1512512: Control flow issues (DEADCODE)
/target/hexagon/idef-generated-emitter.indented.c: 32297 in emit_F2_dfmpylh()
32291 tcg_gen_ori_i64(tmp_3, tmp_2, qemu_tmp_1);
32292 TCGv_i64 tmp_4 = tcg_temp_new_i64();
32293 tcg_gen_mul_i64(tmp_4, tmp_0, tmp_3);
32294 int64_t qemu_tmp_2 = (int64_t)((int32_t) 0x1);
32295 TCGv_i64 tmp_5 = tcg_temp_new_i64();
32296 if (qemu_tmp_2 >= 64) {
>>> CID 1512512: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "tcg_gen_movi_i64(tmp_5, 0L);".
32297 tcg_gen_movi_i64(tmp_5, 0);
32298 } else {
32299 tcg_gen_shli_i64(tmp_5, tmp_4, qemu_tmp_2);
32300 }
32301 TCGv_i64 tmp_6 = tcg_temp_new_i64();
32302 tcg_gen_add_i64(tmp_6, RxxV, tmp_5);
** CID 1512511: Control flow issues (DEADCODE)
/target/hexagon/idef-generated-emitter.indented.c: 32257 in emit_F2_dfmpyll()
________________________________________________________________________________________________________
*** CID 1512511: Control flow issues (DEADCODE)
/target/hexagon/idef-generated-emitter.indented.c: 32257 in emit_F2_dfmpyll()
32251 } else {
32252 tcg_gen_shri_i64(tmp_3, prod, qemu_tmp_0);
32253 }
32254 int64_t qemu_tmp_1 = (int64_t)((int32_t) 0x1);
32255 TCGv_i64 tmp_4 = tcg_temp_new_i64();
32256 if (qemu_tmp_1 >= 64) {
>>> CID 1512511: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "tcg_gen_movi_i64(tmp_4, 0L);".
32257 tcg_gen_movi_i64(tmp_4, 0);
32258 } else {
32259 tcg_gen_shli_i64(tmp_4, tmp_3, qemu_tmp_1);
32260 }
32261 tcg_gen_mov_i64(RddV, tmp_4);
32262 TCGv_i64 tmp_5 = tcg_temp_new_i64();
** CID 1512510: Control flow issues (DEADCODE)
/target/hexagon/idef-generated-emitter.indented.c: 16045 in emit_M2_dpmpyss_rnd_s0()
________________________________________________________________________________________________________
*** CID 1512510: Control flow issues (DEADCODE)
/target/hexagon/idef-generated-emitter.indented.c: 16045 in emit_M2_dpmpyss_rnd_s0()
16039 tcg_gen_addi_i64(tmp_3, tmp_2, qemu_tmp_0);
16040 int64_t qemu_tmp_1 = (int64_t)((int32_t) 0x20);
16041 TCGv_i64 tmp_4 = tcg_temp_new_i64();
16042 {
16043 int64_t shift = qemu_tmp_1;
16044 if (qemu_tmp_1 >= 64) {
>>> CID 1512510: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "shift = 63L;".
16045 shift = 64 - 1;
16046 }
16047 tcg_gen_sari_i64(tmp_4, tmp_3, shift);
16048 }
16049 TCGv_i32 tmp_5 = tcg_temp_new_i32();
16050 tcg_gen_trunc_i64_tl(tmp_5, tmp_4);
** CID 1512509: Control flow issues (DEADCODE)
/target/hexagon/idef-generated-emitter.indented.c: 32287 in emit_F2_dfmpylh()
________________________________________________________________________________________________________
*** CID 1512509: Control flow issues (DEADCODE)
/target/hexagon/idef-generated-emitter.indented.c: 32287 in emit_F2_dfmpylh()
32281 tcg_gen_extract_i64(tmp_1, RttV, ((int32_t) 0x1) * 32, 32);
32282 int64_t qemu_tmp_0 = (int64_t)((int32_t) 0x14);
32283 TCGv_i64 tmp_2 = tcg_temp_new_i64();
32284 if (qemu_tmp_0 != 0) {
32285 tcg_gen_extract_i64(tmp_2, tmp_1, 0, qemu_tmp_0);
32286 } else {
>>> CID 1512509: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "tcg_gen_movi_i64(tmp_2, 0L);".
32287 tcg_gen_movi_i64(tmp_2, 0);
32288 }
32289 int64_t qemu_tmp_1 = (int64_t)((int32_t) 0x100000);
32290 TCGv_i64 tmp_3 = tcg_temp_new_i64();
32291 tcg_gen_ori_i64(tmp_3, tmp_2, qemu_tmp_1);
32292 TCGv_i64 tmp_4 = tcg_temp_new_i64();
** CID 1512508: Control flow issues (DEADCODE)
/target/hexagon/idef-generated-emitter.indented.c: 32250 in emit_F2_dfmpyll()
________________________________________________________________________________________________________
*** CID 1512508: Control flow issues (DEADCODE)
/target/hexagon/idef-generated-emitter.indented.c: 32250 in emit_F2_dfmpyll()
32244 TCGv_i64 tmp_2 = tcg_temp_new_i64();
32245 tcg_gen_mul_i64(tmp_2, tmp_0, tmp_1);
32246 tcg_gen_mov_i64(prod, tmp_2);
32247 int64_t qemu_tmp_0 = (int64_t)((int32_t) 0x20);
32248 TCGv_i64 tmp_3 = tcg_temp_new_i64();
32249 if (qemu_tmp_0 >= 64) {
>>> CID 1512508: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "tcg_gen_movi_i64(tmp_3, 0L);".
32250 tcg_gen_movi_i64(tmp_3, 0);
32251 } else {
32252 tcg_gen_shri_i64(tmp_3, prod, qemu_tmp_0);
32253 }
32254 int64_t qemu_tmp_1 = (int64_t)((int32_t) 0x1);
32255 TCGv_i64 tmp_4 = tcg_temp_new_i64();
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yrzEQNXe51mg-2FlKoEnRoarMq5nOxxfhqLUuo8HvG2S4Ew-3D-3DbhwO_HM6v81mUGiNDJakbNe6YIRym-2FQHdIITfL-2F6M7vogPEFZsLU1jTbzTaCeyjviVsFQbBtqkUAi0j5NgYn6TunnxkQOIazJbAGHPpUUiVWiLdepITfddm-2BZj5rEvsNpXIGxoCBaqL46nJjmZh0KtMVH7OF2PUhlwJEAF8mxruXgXKxWiIhfYkC5C9ZGRS-2Bb899ClIwrdzrG-2Bcyej9gVEhhbTg-3D-3D
To manage Coverity Scan email notifications for "anjo@rev.ng", click https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yped04pjJnmXOsUBtKYNIXxkHoxhtWuBL8xoZ3fXkWsjZDnFzdblVNdGVG7hTtMZDUMu9N-2FYFh-2BJcj3muNZzOh-2Bw69-2BzSi3-2Bq8J92Hkdofe5qo1YUQPHgoatMDbyIAxhNk-3DSIxP_HM6v81mUGiNDJakbNe6YIRym-2FQHdIITfL-2F6M7vogPEFZsLU1jTbzTaCeyjviVsFQjadlt-2B2lzdXKw3TRUawXJePqEdv2tDdi9YF5DmvrNW-2BzIqvOihj37P4PnQkxzqLli3gtnfjMNcu8OdlowwiquMdWPu63YHLdJ3vzUw8b00nEIzPsYQD9PMFGPPitGYc6d-2B71ETjA-2FyDsAw1RS5JQhw-3D-3D
next parent reply other threads:[~2023-05-22 20:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6467d9133bd9f_57b172b16e2c9d98835043@prd-scan-dashboard-0.mail>
2023-05-22 20:24 ` Anton Johansson via [this message]
2023-05-23 9:17 ` Help finding Coverity defects for generated Hexagon code Peter Maydell
2023-05-23 10:29 ` Paolo Bonzini
2023-05-23 13:29 ` Anton Johansson via
2023-05-23 15:31 ` Richard Henderson
2023-05-23 17:56 ` Brian Cain
2023-06-02 13:18 ` Anton Johansson via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ffdd486-ec7d-49c7-1330-0d0b090735b9@rev.ng \
--to=qemu-devel@nongnu.org \
--cc=anjo@rev.ng \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).