From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from localhost.localdomain (unknown [180.246.144.41]) by gnuweeb.org (Postfix) with ESMTPSA id 411B6807CA; Wed, 17 Aug 2022 13:35:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1660743337; bh=MaIpPuDOtxLdDnTqWiYrrnuih6o+6EnVCGBvCMOw7sE=; h=From:To:Cc:Subject:Date:From; b=al/4xAvc48zGWTne11qxaYIpcQbuSuLJymRuGHMr/0fOs6YlJFieFaLxOE+1oD7sr iGo0Dtla9DtRjMq9XV5A90kxdOBgypt+J0Psr9aIKBBW6HTtBYrfTT88M9P8XAFsYt mlY7sVIZhDz4aKKoxq+ELxpr3xhHFhoot1buWdWYm8ptSgSHmgxAAN6fBU8nz6HXp3 Zdo5hmZIKbaMlzUqvSCMHwFmGXEeLVgHo9PZGM+AsmT/ceOhvKmwfHggmzafzLTvFV doEqM3GxXrZMwbFxcYWzAU79PGLzYv16lkrdFmh6vVA0imJKmNFHk+MBjoN0zuUFWJ wI78g8wO2qv7A== From: Ammar Faizi To: Alviro Iskandar Setiawan Cc: Ammar Faizi , GNU/Weeb Mailing List Subject: [PATCH ncns v1 0/2] ncns fixes Date: Wed, 17 Aug 2022 20:35:20 +0700 Message-Id: <20220817133522.1339809-1-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Hi Al, Yet another small series for ncns. 1) Initialize `read_ret_` to zero. We can't rely on read_ret_ value being random at initialization. This caused a real crash where @ret value being random (83382480 in this case): ret = 83382480 [0817/093957.227555:FATAL:scoped_refptr.h(272)] Check failed: ptr_. #0 0x7fa9a8a6b62c #1 0x7fa9a87cb30a #2 0x7fa9a87cb2c5 #3 0x7fa9a881c799 #4 0x7fa9a881cfa9 #5 0x7fa9a878537b #6 0x7fa9a93866b6 #7 0x7fa9a93121fa #8 0x7fa9a931debd #9 0x000000b0deed #10 0x000000d972d0 #11 0x000000d9880f #12 0x0000016dabb9 2) Set error string when the Chromium hits net error. Translate the error code to string when the Chromium hits a net error. This makes debugging easier for the callers because now we can know what the returned error code means, easily. Signed-off-by: Ammar Faizi --- Ammar Faizi (2): chnet: Initialize `read_ret_` to zero chnet: Set error string when the Chromium hits net error chnet/chnet.cc | 12 ++++++++++++ chnet/chnet.h | 2 ++ 2 files changed, 14 insertions(+) base-commit: 971f49f53c730aa82466b251a2b682c0827c3ec4 -- Ammar Faizi