From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 9A2D53856DC5 for ; Thu, 14 Jul 2022 15:40:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9A2D53856DC5 Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-15-Fo3y7hbgN0mgvFDrpiRVjQ-1; Thu, 14 Jul 2022 11:40:13 -0400 X-MC-Unique: Fo3y7hbgN0mgvFDrpiRVjQ-1 Received: by mail-qk1-f199.google.com with SMTP id o13-20020a05620a2a0d00b006b46c5414b0so1389942qkp.23 for ; Thu, 14 Jul 2022 08:40:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=RkKVh2m4pmSb+v2t2JFRdiEtWyZqTSi+WMUh/F6AVv4=; b=Jhv5nW7A0XmjQduE5g1jIAhK2LxN/P/rHcIBEXV110OCXux6HW+thtJ2ua2/LtezqY BRDND0/FhJZl3x5zl2bqoG1E9tgftM/1krONRm26Ve6wlDWRpw70N1h0KkVwH4iU3G6x aYA2c4PkjHzyCt+ny6EdpK0XgTfcU2yR3tYjUsWAyGbdNNP1ozlubDKxHGssuyOkn/nF CUlRSV7SAjwD47oKcucFK4FaHphPlyZiSy7EPiRZYhHhgu9Hh99VzNQ3Shr/Ta1dgHUt TX6rBNqIW1pxbgQmogyat9NjSB5mPXuTR77NlYXmJ5VNh+E15Xnhv7Z3az6l0T7qeXDa QnkA== X-Gm-Message-State: AJIora8IYfb394Njz6w6oep+38DHWvGU1iYXcq44reDqEuz0Xw4+hRPQ j3jbpABoXOOqEXGeOJUO/5Fh7SBhaVNDCVIL0/sjMNorQD6qM5wO877mB5Kcd+wnNPV41iCpaDz lclpSPY0= X-Received: by 2002:a05:6214:1c89:b0:46e:4048:ca2c with SMTP id ib9-20020a0562141c8900b0046e4048ca2cmr8210858qvb.60.1657813212810; Thu, 14 Jul 2022 08:40:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uJM++X7Hu4kzSIQX99blp9dKq3cv/PS9VcVNo4Te9HfNSNsMtBAWdkdFYYSxuYc6196u2Drw== X-Received: by 2002:a05:6214:1c89:b0:46e:4048:ca2c with SMTP id ib9-20020a0562141c8900b0046e4048ca2cmr8210771qvb.60.1657813211652; Thu, 14 Jul 2022 08:40:11 -0700 (PDT) Received: from t14s.localdomain (c-73-69-212-193.hsd1.nh.comcast.net. [73.69.212.193]) by smtp.gmail.com with ESMTPSA id 67-20020aed30c9000000b0031ea2328edcsm1627808qtf.82.2022.07.14.08.40.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jul 2022 08:40:10 -0700 (PDT) Message-ID: <698f2938450d27eae27fa3f6a6cf82b108cee28a.camel@redhat.com> Subject: Re: [PATCH] analyzer PR 106003 From: David Malcolm To: Mir Immad , gcc@gcc.gnu.org Date: Thu, 14 Jul 2022 11:40:09 -0400 In-Reply-To: <1da7fe0090c220a7c049b3527f2735ddc60b5659.camel@redhat.com> References: <1da7fe0090c220a7c049b3527f2735ddc60b5659.camel@redhat.com> User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, BODY_8BITS, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2022 15:40:16 -0000 On Thu, 2022-06-23 at 19:20 -0400, David Malcolm wrote: > On Fri, 2022-06-24 at 00:00 +0530, Mir Immad wrote: [...snip...] > > + > > +enum access_mode > > +fd_state_machine::get_access_mode_from_flag (int flag) const > > +{ > > +  /* FIXME: this code assumes the access modes on the host and > > +          target are the same, which in practice might not be the > > case. */ > > Thanks for moving this into a subroutine. > > Joseph says we should introduce a target hook for this: >   https://gcc.gnu.org/pipermail/gcc/2022-June/238961.html > > You can see an example of adding a target hook in commit > 8cdcea51c0fd753e6a652c9b236e91b3a6e0911c. > > As noted above, I think we can leave adding the target hook until a > followup patch, if this is only going to be an issue with cross- > compilation between Hurd and non-Hurd systems. FWIW, for reference, I've filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106302 about this; it strikes me that there are other flags we might eventually want to test e.g. for mmap we'd want to look at MAP_ANONYMOUS and the various PROT_* values. Dave