From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id A6CCB10E258 for ; Mon, 14 Feb 2022 18:08:56 +0000 (UTC) Date: Mon, 14 Feb 2022 10:08:54 -0800 Message-ID: <874k51gw21.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <60fd1652892e4bd8908467ca74745d1b@intel.com> References: <20211025092305.14742-1-anshuman.gupta@intel.com> <20211025092305.14742-2-anshuman.gupta@intel.com> <877da01zro.wl-ashutosh.dixit@intel.com> <60fd1652892e4bd8908467ca74745d1b@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [igt-dev] [PATCH i-g-t 1/2] lib: Add silent __igt_i915_driver_unload List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: "Gupta, Anshuman" Cc: "igt-dev@lists.freedesktop.org" , "Nilawar, Badal" List-ID: On Mon, 14 Feb 2022 02:23:11 -0800, Gupta, Anshuman wrote: > > > This seems like a bug. The sound and aux arrays above should be static > > otherwise these strings go out of scope after the function exits. ? > AFAIU all string literals (both local and global) are part of .rodata elf > section, which is ultimately a file backed read-execute-private mapping > (r-xp) in process map (/proc/pid/maps). This should not go out of > scope. Please correct me if I am being wrong here. Yup, if the file is mmap'd you are right.