From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id ACE92C76000; Thu, 15 Aug 2024 11:20:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org ACE92C76000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1723710028; bh=uRgu5yG+h/ahpS2DJK7vHhQqXtBd9Rtrng6acZZyr20=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=fFThF0CnEMpOSeWzIK3q3gVbXZ+bBgT/fmTTsdHeCis1LEWnKC+6I0VrvcNKx5QNv tIl+sW2FgrLVciRrVFZjKjKQ65Kj0MWZj2kkq0sVQSWAeAq91U0SHueWdZKbYVD4vC efZdv+DDU+Jlo7hfWYWp5BE5W13/tlAVGsiIdc/k= Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 57F6DC76024 for ; Thu, 15 Aug 2024 11:20:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 57F6DC76024 Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-42816ca782dso4115535e9.2 for ; Thu, 15 Aug 2024 01:20:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723710026; x=1724314826; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AoLdI4cKu3JLJmGoe9rvoERNFLJOnS1Z435Eisa6xpw=; b=nU/QLy8NHL6xMtIrJ4fj2tp7bImqFH1g/djjRxkMlt1sf0BWEFg3EtwcmKTzFyji+6 qgZl0VzpdCGmvZK7Me+AKH4bJHjw9UwR6S+5XymbmwRMn/tEqDlZoTiFHEMvUmSX6urC //WSV181e8WzNnjThpsDOkFdrLc1BIA+SOIthIO5NfyY9bcMS1+Qb67vg4o2vzFdG0BF 3Z2KKpc18/sT+CjGq0/sDn9auhqzrWfPaTziu2NRbloA9Rq8mRSxmqeR9zpUL7VccIsh iCkU0IYYfhJQZGOJvt+YpjLOlH1YzdxOAso/aqsJ9J8mizb7lvXO+2Q+OQ0YcxO4J6Sb Zmig== X-Gm-Message-State: AOJu0YyjxfQMAjZ3e7tneav+z4vPHbS9sjptLAk9v+W3GbIoSkUIQcob 9yZvcDw3yOpixTHOkzZri+4xC4VSYMrt9LV3dAYfDrsDrHY/6A9gpCmSCNnS X-Google-Smtp-Source: AGHT+IHhk1uSFLkFidvwud2Q8WUOhZUyWRIJktvjfsfCeUd7I8SeA5kjQWK8CLwIBSEjB1q5Lg7Ejg== X-Received: by 2002:a05:600c:138b:b0:428:e866:3933 with SMTP id 5b1f17b1804b1-429dd23d4bdmr35590945e9.22.1723710025665; Thu, 15 Aug 2024 01:20:25 -0700 (PDT) Received: from pony.mail.msk ([5.181.62.98]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429e7e1c5f2sm12180135e9.40.2024.08.15.01.20.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Aug 2024 01:20:25 -0700 (PDT) To: tarantool-patches@dev.tarantool.org, Sergey Kaplun , Maxim Kokryashkin Date: Thu, 15 Aug 2024 11:15:55 +0300 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit 0/2][v2] Fix cdata finalizer table X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" From: Sergey Bronnikov Branch: https://github.com/tarantool/luajit/tree/ligurio/lj-1168-heap-use-after-free-on-access-to-CTState-finalizer-nointegration PR in Tarantool: https://github.com/tarantool/tarantool/pull/9796 NOTE: Jobs with Tarantool integration regression tests has failed because patch "FFI: Turn FFI finalizer table into a proper GC root." broke Tarantool build and fix (see below) must be applied before a bump to LuaJIT version with proposed patches. Mike Pall (2): FFI: Treat cdata finalizer table as a GC root. FFI: Turn FFI finalizer table into a proper GC root. src/lib_ffi.c | 20 +-- src/lj_cdata.c | 2 +- src/lj_ctype.c | 12 ++ src/lj_ctype.h | 2 +- src/lj_gc.c | 38 +++--- src/lj_obj.h | 3 + src/lj_state.c | 3 + .../lj-1168-unmarked-finalizer-tab.test.c | 123 ++++++++++++++++++ .../lj-1168-unmarked-finalizer-tab.test.lua | 18 +++ 9 files changed, 180 insertions(+), 41 deletions(-) create mode 100644 test/tarantool-c-tests/lj-1168-unmarked-finalizer-tab.test.c create mode 100644 test/tarantool-tests/lj-1168-unmarked-finalizer-tab.test.lua -- 2.34.1