From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#36773: 27.0.50; Accessing a cached SVG with eww can cause Emacs to crash Date: Wed, 24 Jul 2019 18:28:20 +0000 Message-ID: References: <83zhl3o5gf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="85838"; mail-complaints-to="usenet@blaine.gmane.org" Cc: plaiceadam@gmail.com, 36773@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 24 20:30:09 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hqM1h-000MBc-6m for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Jul 2019 20:30:09 +0200 Original-Received: from localhost ([::1]:54068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqM1g-0006IJ-6B for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Jul 2019 14:30:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43472) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqM1c-0006HF-Lz for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2019 14:30:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqM1b-0006DJ-Fq for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2019 14:30:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57444) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hqM1b-0006Ci-BU for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2019 14:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hqM1b-0005eE-2Y for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2019 14:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Jul 2019 18:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36773 X-GNU-PR-Package: emacs Original-Received: via spool by 36773-submit@debbugs.gnu.org id=B36773.156399294421593 (code B ref 36773); Wed, 24 Jul 2019 18:30:02 +0000 Original-Received: (at 36773) by debbugs.gnu.org; 24 Jul 2019 18:29:04 +0000 Original-Received: from localhost ([127.0.0.1]:38032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hqM0d-0005cD-Kl for submit@debbugs.gnu.org; Wed, 24 Jul 2019 14:29:03 -0400 Original-Received: from mail-ot1-f54.google.com ([209.85.210.54]:43983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hqM0c-0005bk-HC for 36773@debbugs.gnu.org; Wed, 24 Jul 2019 14:29:03 -0400 Original-Received: by mail-ot1-f54.google.com with SMTP id j11so24617894otp.10 for <36773@debbugs.gnu.org>; Wed, 24 Jul 2019 11:29:02 -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=VHlHOlJTSLX69YEXaSHzKQHXc4t8z79d2XC9OETlYt4=; b=JcSnrYRCezlxEMP/rPEXsfd61wPLbv07Cp0UGR/3oVws0sFww6q3joXmktBl8qvfl6 JdkqpAYCUaAgkVrqDDOP1T48o8ERHpbrVBm1esHkfa4B5/zkzoVrlgCy86SLP2TKqQcn xj6zcipyknoOCkbnKr9PGVmoWs0JI9psFOCOq4jWBBAhXAZUFdJxU1AJYITOxJ8LGvsQ 5xqU+oQQKkilXHK2/nQxUZ2xXMPTOh4d1RoNFnbII3/dVNEPyazHl91mRpL1zY4i+XGl mNclhtOo3RcRzgZyjWqncMYi4bCvV5zC9H92VFvHyxjIy5C4x4iS/l0SHGl2H8Cc34sj D6UQ== 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=VHlHOlJTSLX69YEXaSHzKQHXc4t8z79d2XC9OETlYt4=; b=sSRnKGXHpefk3t3yJzd+qohKXaxgip2xdmQdrBDi38ahFLawVDTjaKffuMoXLvd9tA qyn1NiQcA4pUjVKWiGzJji6WXQzVhwB0wC8elTuPjk63WNE46kb0j6S3qNUKOmACd+wK NkJAJl2YrCPI4NJWAsOB800qcOb5vBijl+yarV7/vVCZNw52/IU5w3s7pqzrVBGcoX8A eybkbty12aqqqbJkN5EmuA12QpXFvn8u3FQrIxR/381l6egYSFem1IJZ8ONnddL5WUao ueHrdWeYjPTADnerTi4LpbGQjepHmdl9ZDZ69g/U5bSYDWC6pefrH7iMDEaQDKVylChC rl/w== X-Gm-Message-State: APjAAAVlABALbBYQ8YtDruN9maIPmk1Q3lXO2Iq+wVMoykf53O0P4vOB yVdxB7d65k2ciWIk/Gf8usz035xn+SgUO4g72Yg= X-Google-Smtp-Source: APXvYqzANthJOgOWtUnOp74uDcvERMLrrzphTgHFleF0iY6SoaaTpkAQgDpteeV5QsNH69x5EHJSMS+YMp2z4yxSgeQ= X-Received: by 2002:a9d:2901:: with SMTP id d1mr41119518otb.154.1563992936799; Wed, 24 Jul 2019 11:28:56 -0700 (PDT) In-Reply-To: <83zhl3o5gf.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163677 Archived-At: On Wed, Jul 24, 2019 at 2:47 PM Eli Zaretskii wrote: > > From: Pip Cet > > Date: Wed, 24 Jul 2019 13:24:46 +0000 > > Cc: 36773@debbugs.gnu.org > > > > As for the other bug, it's a little tricky: shr calls > > url-store-in-cache after url-http-parse-headers has decompressed the > > file, while url-http-parse-headers itself would (correctly) cache the > > uncompressed file if it were configured to do so. It's not quite clear > > who's at fault here. > > What's more, this problem doesn't happen in Emacs 26.2.90. Can you > see why it started happening in Emacs 27? Maybe that will provide a > hint as to how to fix it. - (zlib-decompress-region (point) (point-max))))))) + (zlib-decompress-region (point) (point-max) t)))))) The allow-partial flag means to delete rather than simply leave the (uncompressed) data in place. So I guess that is a hint, we could just go back to the Emacs-26 behavior. I don't think we should, but in practice it should work okay. > Btw, I see the same behavior as you, Pip: g_object_unref error > messages and no crash. librasvg returns a NULL handle, but it also > returns a non-zero err. My librsvg version is 2.40.1. The bug in librsvg was introduced between 2.40.1 and 2.40.13, and has been fixed again since. 2.40.13 does: if (g_buffered_input_stream_fill (G_BUFFERED_INPUT_STREAM (stream), 2, cancellable, error) != 2) { g_object_unref (stream); return FALSE; } Which returns without an error filled in if stream doesn't contain at least two bytes.