Message ID | 1497124148-11187-1-git-send-email-simon.marchi@ericsson.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 29472 invoked by alias); 10 Jun 2017 19:49:26 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 21101 invoked by uid 89); 10 Jun 2017 19:49:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:sk:DBXPR07, H*RU:sk:DBXPR07, H*r:sk:DBXPR07 X-HELO: sesbmg23.ericsson.net Received: from sesbmg23.ericsson.net (HELO sesbmg23.ericsson.net) (193.180.251.37) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 10 Jun 2017 19:49:17 +0000 Received: from ESESSHC008.ericsson.se (Unknown_Domain [153.88.183.42]) by sesbmg23.ericsson.net (Symantec Mail Security) with SMTP id 1D.51.22014.E3D4C395; Sat, 10 Jun 2017 21:49:20 +0200 (CEST) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (153.88.183.145) by oa.msg.ericsson.com (153.88.183.42) with Microsoft SMTP Server (TLS) id 14.3.339.0; Sat, 10 Jun 2017 21:49:18 +0200 Authentication-Results: sourceware.org; dkim=none (message not signed) header.d=none; sourceware.org; dmarc=none action=none header.from=ericsson.com; Received: from elxacz23q12.localdomain (80.216.243.234) by DBXPR07MB320.eurprd07.prod.outlook.com (2a01:111:e400:941d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.5; Sat, 10 Jun 2017 19:49:17 +0000 From: Simon Marchi <simon.marchi@ericsson.com> To: <gdb-patches@sourceware.org> CC: Simon Marchi <simon.marchi@ericsson.com> Subject: [PATCH] compile-loc2c: Fix uninitialized variable error Date: Sat, 10 Jun 2017 21:49:08 +0200 Message-ID: <1497124148-11187-1-git-send-email-simon.marchi@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: AM4P190CA0010.EURP190.PROD.OUTLOOK.COM (2603:10a6:200:56::20) To DBXPR07MB320.eurprd07.prod.outlook.com (2a01:111:e400:941d::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d0a4d171-1f40-414f-64f9-08d4b039c7a9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:DBXPR07MB320; X-Microsoft-Exchange-Diagnostics: 1; DBXPR07MB320; 3:3AnzY3ipjNEExUvi/m6Ig/wglMcZ65PUepOOA43fKOujfdYDe+Isqn0gKsjs6EnCU3qUfXKdK+RkxtvcwQwD5noj8htcWaaWGbT3o+OjWD00pQH5S+3yN1G7LvTHrONBNPocHUBXL0PaaXenqIU/UYf/69iD8yV3vgkm4opqiFKsNOFFC56vviOK62nFd6lbRFVlk8xtc8O7vv3iVPd3PFakzXnUQrfWS542Ex3dDfHW5exCiTVS7u5MP3IvKmJVLsDK/A4myFX+lUvA6gjsv1XjcjOxFaA/aTTmRlRhAwOm7KBNH1/0K+GN7gGBf2b3pr9uXLSFOZzP4p3AV9sVvg==; 25:dZ9CrxywTtAIo4q8DiSLynesOiwYuZaAJmtOIdmkxOCCifGEvUIwU56LsATCyBssiGpxyaGgflpqYU55GKHcanRww8fRC11numlP5XeK6RDCWU93rD+/r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PSQ2GwZ4gTgZov6gkEhmwik1FChIDD7EiOyqWCZYhgxel0UpzekgSlOle8YIbj431/ooRyk7OBj8kjSWhAxQ4zmRxK/eGqPCXg4zHGc9a1QFWp9sw2mD X-Microsoft-Antispam-PRVS: <DBXPR07MB3201331B60F2D371065A3BDEDCF0@DBXPR07MB320.eurprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DBXPR07MB320; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DBXPR07MB320; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DBXPR07MB320; 4:v9FzWL8DzVM4Q8iGt5nAeupP+DsG7cDBpVZiRZeINqV?= =?us-ascii?Q?y26yJeLKxxcMvNsk35xw3kN1irbZ/x2w1azU8mDcTCi+53pdZH7NngMlDMyw?= =?us-ascii?Q?j0cigAvn8Pqvx0UzEfGXzqsj43J9hK6DJZGoELuFuTi8jZICTXO+UDBvPLxV?= =?us-ascii?Q?4n1iOefIIulbfsB+6f0jiTohUVI1dYS5kVcXscChRri6oin9259Q6oHvMnyN?= =?us-ascii?Q?79yQwMUwg8U4l0Xk7VH1N84lpnhmhS9YtJtqMpO+b8cO8zn4ynwlqein23ty?= =?us-ascii?Q?fItX86Zz/2Toh3e5Zv5Vbb/rfoPZz6qcC4G9RkdHDUcaGcyKSv659iTlLdJO?= =?us-ascii?Q?2X6X4p7oKJKioVdhXyIfdVpk0T8GqSaQkXbGjmi2WEMPgsXxayn/efPW0+Xk?= =?us-ascii?Q?QVLTFluCcMi6gdjccaQa06MSOVaCvz/eft1vU3WhPBLlzcpzL9oBy7dhJr0j?= =?us-ascii?Q?0B4orkfeNPC0nq2jLVFNBoB5wZZ0WzbAJPj5tBROyP30rz705BnmfbxIfrEm?= =?us-ascii?Q?ss5qh0irn1wHWfJOUvFlCDP3n+dKqH4zbssQ9jmBFUgtJktzVvC/UZ32o6n/?= =?us-ascii?Q?RG90lm6asmaQKLnOPZVi776gml8DJyH3yV9dfUp1cGsL6K9TypP0qyOelEX6?= =?us-ascii?Q?W6I+IDYlJFyPNFwlKD+X47vOd3vfM5+pAZ0GqyL25mvWgPhcx0uZMHu3zZ0s?= =?us-ascii?Q?yAc6016WsbJfyVeiCS2ihpusDv+40ps8rUsnFSFhcLNAUAkogB0w9iS6oIeE?= =?us-ascii?Q?Igpklln1kjqsz3ac7GYKkMUGBLzkKxkYKkjaw4k4IItOh4SUMhDOZOHyUPI4?= =?us-ascii?Q?q0sHAwN9Rqx6irbMKjXCiWMtAKGDnCDkQMuzcjJl+puNTyzApqcpAjYufAqF?= =?us-ascii?Q?yeYfhdywNYwuKkEc5xT2RlWWENF94Txnhq8RavCITvcgtSvSxseFwj3lg1AU?= =?us-ascii?Q?3pHl4sekcpoClOxelmQDGYmbhgbHEwnVzFI7QCiUqfsq5HHQM7mxrpk87t8h?= =?us-ascii?Q?B3u6gjRZLpKJHzyxoqec77xeojhMVtnarNwbcPLMq7BvOS9LG2LwXmFbKrZx?= =?us-ascii?Q?gIQ/4UliM2lktSl5y/Fib6X1v9rSk8Q7PgLxELLWI3WBjnRvkwOoLhy6W68J?= =?us-ascii?Q?Fnhln8e79JzZK1Ore6x0rglr1O4Kf?= X-Forefront-PRVS: 0334223192 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39400400002)(39850400002)(39840400002)(39450400003)(39410400002)(54534003)(6486002)(7736002)(50226002)(47776003)(4326008)(478600001)(8676002)(6916009)(6666003)(25786009)(81166006)(36756003)(66066001)(86362001)(3846002)(189998001)(48376002)(2906002)(6512007)(53936002)(110136004)(107886003)(33646002)(38730400002)(5003940100001)(50986999)(2351001)(42186005)(305945005)(2361001)(6506006)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:DBXPR07MB320; H:elxacz23q12.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DBXPR07MB320; 23:3x6pf+TUOPu73vEgTi2DlidR09E+DLOhFlXv45jPEU?= =?us-ascii?Q?4G9CLjOSF+rnQ+vaa9MSgIjfo0/9ZRoK9/GARJUbSwP+XVoziMpRaa1g3jXg?= =?us-ascii?Q?2am+6W3/gbvmQ1o9bVgZ3/pwG/BzevNYP2ZX4e7abypl2E3NQXDkxoSWh1lM?= =?us-ascii?Q?h+qVfpJilK9uOrRnoBr+GVqIqm9YT0GqIcFRDw7H4/+9ZOFpK3Uc31azado+?= =?us-ascii?Q?QAvgcGqeMaicco/mbpYi3RBIZxZhBuUbPDnnLQVg0Tcqo+VID843usYMEopo?= =?us-ascii?Q?t3+FPjqaV0AAF4U1QmypeVU8qRHBREv/GKV7YTOJ/tFvCQog87aydmHMcgCP?= =?us-ascii?Q?ElHzW43Xz5nlkW7LrFzJ7A5yhTIOk/YT3dbmHr17ZVudAR6FWyQq2MYDO+pA?= =?us-ascii?Q?MsAowTwgmNBoHnKxUW0k1YUSTkYdZLWa6xG12Ea982isFQyy8g1wlOxum1Mu?= =?us-ascii?Q?hGpUYWIxL2JJJ6q/Ps7NoNviZot0YAcPLb2SYUrGL8ER+5p/UNFyeNvtdhXT?= =?us-ascii?Q?3lmfLKhlsUbNJ9cf/DCMtMMCFfOC/GZmzaTh+OCZJxxs3wH8Yejd6o9leveB?= =?us-ascii?Q?YEtDfi1+0CKxcsjVf31zYzZpse/SyA7Uf3IZtwGD26xXP2iVpRkqDzKvNEXJ?= =?us-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-CrossTenant-OriginalArrivalTime: 10 Jun 2017 19:49:17.2762 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBXPR07MB320 X-OriginatorOrg: ericsson.com X-IsSubscribed: yes |
Commit Message
Simon Marchi
June 10, 2017, 7:49 p.m. UTC
Compiling with clang gives this warning/error: /home/emaisin/src/binutils-gdb/gdb/compile/compile-loc2c.c:731:6: error: variable 'uoffset' is uninitialized when used here [-Werror,-Wuninitialized] uoffset += dwarf2_per_cu_text_offset (per_cu); ^~~~~~~ /home/emaisin/src/binutils-gdb/gdb/compile/compile-loc2c.c:669:23: note: initialize the variable 'uoffset' to silence this warning uint64_t uoffset, reg; ^ = 0 I am really not sure if what this patch does is good, but it is my best guess. DW_OP_addr means that there's an constant address provided by the DWARF bytecode that should be pushed on the stack. That address is considered skipped by the "op_ptr += addr_size", but it is never read. uoffset is indeed read just after, without having been assigned first. So I think the intent is to read the address, it was just omitted. gdb/ChangeLog: * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read address when op is DW_OP_addr. --- gdb/compile/compile-loc2c.c | 1 + 1 file changed, 1 insertion(+)
Comments
On 2017-06-10 21:49, Simon Marchi wrote: > Compiling with clang gives this warning/error: > > /home/emaisin/src/binutils-gdb/gdb/compile/compile-loc2c.c:731:6: > error: variable 'uoffset' is uninitialized when used here > [-Werror,-Wuninitialized] > uoffset += dwarf2_per_cu_text_offset (per_cu); > ^~~~~~~ > /home/emaisin/src/binutils-gdb/gdb/compile/compile-loc2c.c:669:23: > note: initialize the variable 'uoffset' to silence this warning > uint64_t uoffset, reg; > ^ > = 0 > > I am really not sure if what this patch does is good, but it is my best > guess. DW_OP_addr means that there's an constant address provided by > the DWARF bytecode that should be pushed on the stack. That address is > considered skipped by the "op_ptr += addr_size", but it is never read. > uoffset is indeed read just after, without having been assigned first. > > So I think the intent is to read the address, it was just omitted. > > gdb/ChangeLog: > > * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read > address when op is DW_OP_addr. > --- > gdb/compile/compile-loc2c.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/gdb/compile/compile-loc2c.c b/gdb/compile/compile-loc2c.c > index a53214f..ead1003 100644 > --- a/gdb/compile/compile-loc2c.c > +++ b/gdb/compile/compile-loc2c.c > @@ -722,6 +722,7 @@ do_compile_dwarf_expr_to_c (int indent, string_file > &stream, > break; > > case DW_OP_addr: > + uoffset = extract_unsigned_integer (op_ptr, addr_size, byte_order); > op_ptr += addr_size; > /* Some versions of GCC emit DW_OP_addr before > DW_OP_GNU_push_tls_address. In this case the value is an Hi Tom, As you are the original author of that code, would it be possible for you to take a quick look, if you remember any of this :) ? Thanks, Simon
>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes: Sorry about the delay on this. I've been away. >> * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read >> address when op is DW_OP_addr. Simon> As you are the original author of that code, would it be possible for Simon> you to take a quick look, if you remember any of this :) ? This patch looks correct to me. I'm sure the earlier state was just an oversight. FWIW in gimli's DWARF expression code, I separated the format decoder from the evaluator to avoid this sort of problem. Each operation is decoded to an object; and then evaluation is done using the object. This isn't perfect, as different users of the decoded objects can still disagree about the semantics of the operation, but an approach like this would have caught this bug. Tom
On 2017-07-09 18:44, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes: > > Sorry about the delay on this. I've been away. > >>> * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read >>> address when op is DW_OP_addr. > > Simon> As you are the original author of that code, would it be > possible for > Simon> you to take a quick look, if you remember any of this :) ? > > This patch looks correct to me. I'm sure the earlier state was just an > oversight. Thanks! Pushing it now. > FWIW in gimli's DWARF expression code, I separated the format decoder > from the evaluator to avoid this sort of problem. Each operation is > decoded to an object; and then evaluation is done using the object. > This isn't perfect, as different users of the decoded objects can still > disagree about the semantics of the operation, but an approach like > this > would have caught this bug. Indeed, that sounds like a good design. Simon
diff --git a/gdb/compile/compile-loc2c.c b/gdb/compile/compile-loc2c.c index a53214f..ead1003 100644 --- a/gdb/compile/compile-loc2c.c +++ b/gdb/compile/compile-loc2c.c @@ -722,6 +722,7 @@ do_compile_dwarf_expr_to_c (int indent, string_file &stream, break; case DW_OP_addr: + uoffset = extract_unsigned_integer (op_ptr, addr_size, byte_order); op_ptr += addr_size; /* Some versions of GCC emit DW_OP_addr before DW_OP_GNU_push_tls_address. In this case the value is an