From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: san_ignore_object not found at link time Date: Sat, 1 Aug 2020 21:21:01 +0200 Message-ID: References: <20200801141014.51E78C21C82@raman-glaptop.localdomain> <83wo2ictyz.fsf@gnu.org> <83tuxmctmo.fsf@gnu.org> <20200801153823.GA55369@breton.holly.idiocy.org> <83k0yicl01.fsf@gnu.org> <83h7tmcj45.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12649"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Third , Emacs developers , raman To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 01 21:21:55 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k1x4t-0003Du-Nw for ged-emacs-devel@m.gmane-mx.org; Sat, 01 Aug 2020 21:21:55 +0200 Original-Received: from localhost ([::1]:54470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k1x4s-0001DF-Or for ged-emacs-devel@m.gmane-mx.org; Sat, 01 Aug 2020 15:21:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k1x4F-0000jZ-Rl for emacs-devel@gnu.org; Sat, 01 Aug 2020 15:21:15 -0400 Original-Received: from mail-ot1-x343.google.com ([2607:f8b0:4864:20::343]:42202) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k1x4E-0005X6-9D; Sat, 01 Aug 2020 15:21:15 -0400 Original-Received: by mail-ot1-x343.google.com with SMTP id v21so17871825otj.9; Sat, 01 Aug 2020 12:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kM+HEtMBgApLJ06dy/G9Y54B7lAvyBP2FB9lwtYZjwg=; b=UxZ8r2XTnPCf4NMBgglP3+GLbEVNIbKRXMAG2Qd1pjc739dJwTOdCbFcEp5S08FFdW Q165kdi8EGXqhRE9XEsHYlb//rjPSDFJ7l8ffWGHG2h5StcnVyRYdER3yFUUIeHZ1JzJ sgw8jMOqN3TQfvKbd6HhKhkwNvALE/jxiPDuRCqeEcY/vrEopxTxC4QCsKJ7Z6AFoYAd 6mpa/lQ1ZPNWxapMJt7RgK/pFryA6idKg1c/SX77NXo4ZTuqBGdqorqMyTjO0Y5xhU+k hyx1dScsuhL41ysMu6PfSmvFJ9T7jOi89qgfd3lqyQVGjd21VPtvPMRVcMncqpemDWZh bPjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kM+HEtMBgApLJ06dy/G9Y54B7lAvyBP2FB9lwtYZjwg=; b=R6AVn+469zOEnrqM4tWoiCftRDX/NGxFGbxF8xRs34SEB4k81kcgLtjqiB26qIMeK2 +BI2uO6KvOf26H8Ukj0KgIJc5pciyya6Pu6PuPPBEeaKN8PrL+ed73UPpoS+V6zK+Wmr BHsMt4ULT6U9xpmzdj5OHcoHvpyn26VaQT/cX/aJ2ZjFUWWYjVLpA1TEzKsyd0DfPcwL Dvx6ycG5OEQ3ZeDXc8O6aVw5Y2iAmATa4uFLXOykcCsELHOs5Xw1dZfQX+9YYjhk5t6M bAEstx2hGyI37GGsm4Vepe++CCVi4ySM6+Fde0l1VwK2GbqsTmCnM5ExWROnH0jNHTRd eg8A== X-Gm-Message-State: AOAM532IbrPBr8RRGfDBtg60Du7g0yJbAeYfbgf4s+3hGLtATesnkKle wWpuf0x1jGPSzA39O/lzbwRAieX9SQNhuKY+WwyaLw== X-Google-Smtp-Source: ABdhPJxjfEXViS3cetjKEBtylf7vO7wR+IFUgAbjZ9yBqLQ9nkdtmYRNgy/aGB1/08t+yoGSBR1PbIDiIDoDMaLH+M4= X-Received: by 2002:a9d:2203:: with SMTP id o3mr7378791ota.149.1596309672493; Sat, 01 Aug 2020 12:21:12 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::343; envelope-from=p.stephani2@gmail.com; helo=mail-ot1-x343.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:253394 Archived-At: Am Sa., 1. Aug. 2020 um 21:17 Uhr schrieb Philipp Stephani : > > Am Sa., 1. Aug. 2020 um 20:35 Uhr schrieb Philipp Stephani > : > > > > Am Sa., 1. Aug. 2020 um 20:32 Uhr schrieb Eli Zaretskii : > > > > > > > From: Philipp Stephani > > > > Date: Sat, 1 Aug 2020 20:29:29 +0200 > > > > Cc: Alan Third , raman , > > > > Emacs developers > > > > > > > > > alloc.c: In function 'mark_maybe_object': > > > > > alloc.c:4641:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] > > > > > 4641 | void *po = (char *) ((intptr_t) (char *) XLP (obj) > > > > > | ^ > > > > > > > > > > This is a 32-bit build --with-wide-int, in case it matters, where > > > > > EMACS_INT is a 64-bit data type. > > > > > > > > This is due to the unrelated commit a2323c7ccb. (I just happened to > > > > push both commits at the same time.) > > > > It looks like LISP_WORD_TAG in a wide int build is a 64-bit number, so > > > > that the entire expression gets widened to a 64-bit number. However, > > > > since it's cast back to a pointer, the value has to fit in 32 bits. > > > > > > The pointer is there, you just cannot safely extract it by casting to > > > a narrower data type. You need to explicitly mask the MSBs by > > > shifting or some other bit fiddling. > > > > IIUC casting between unsigned integer types is guaranteed to have the > > same effect. > > I've now used INT_SUBTRACT_WRAPV, which should guarantee that the > offset is defined and fits within an intptr_t. However, I guess when using wide ints *and* MSB tags the subtraction might overflow, so maybe the assertion should be conditioned on that case.