Re: [eigen] Eigen and GCC address sanitizer |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: "eigen@xxxxxxxxxxxxxxxxxxx" <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [eigen] Eigen and GCC address sanitizer
- From: "Wood, Tobias" <tobias.wood@xxxxxxxxx>
- Date: Tue, 16 Feb 2021 16:54:01 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kcl.ac.uk; dmarc=pass action=none header.from=kcl.ac.uk; dkim=pass header.d=kcl.ac.uk; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zi+/2XAYdyKtUPnWTw3O/LLgCmsdy7j0Zqa3hhGo/Dk=; b=kOp1s4fMox7dmUdRsNn5y4CoeoV/3ZsBlhNjOTU/Abr02Bsi9Gu57H0eAE4+pMSn33/fH/P+rM0pRk+zubZKMLWnH8sd/VaqAsIjhO3aExXGd78yDgf9tE16RoOtEefnMtRmmXdyzW/VhCBQ6GA8tZO3LaCE2+JfcNk8exP1kJgPbUFa+qCDNE3VmAyuJR+2Pst2tY36O5jaWs/nUodV0XeetCKeEP0SNndJ2LWY/Tzb9Vt3xvPrU9pkqFrkkE70Ss+lI3iX7ZD9cpc3sfCCN/YCg8kB9sDHkibOqrVftWf3YUvcR+y46mBSKm3Us0gAHRV0VPoEwOfrcEzUIr/JAQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dLrzvK1Dc+uCuv2Kxd1st/h5yJQa5fq4LWrBGk4qApzovXZF5mwrcVnj9locLPXV3FRhESCvlDNmhHvWHocs+miJ0rWdUixAN/JLafjsHJRqFFhsTeRWUbzT8SY6mgKsK2/egmVR1H4h0I77TUlY4/Wzu9fn7/V4qOm02QTrteEZqHiS16TzCvAbrrDhQPAvQmD+8Gbb0tz12B9MgThE43eZHi6pRvBhuK2j8bWUdMAQ14mFs40JDLVpD1Zxiq5kYEvs5BfFW2CpfrYODtChKDgE1CSTzgTpzfmZmRUmOyYr4lULCyyp7WItR0mGqspHEl6krKFMvi5F7RCGP/kmQQ==
- Authentication-results: lists.tuxfamily.org; dkim=none (message not signed) header.d=none;lists.tuxfamily.org; dmarc=none action=none header.from=kcl.ac.uk;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kcl.ac.uk; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zi+/2XAYdyKtUPnWTw3O/LLgCmsdy7j0Zqa3hhGo/Dk=; b=Gr2JalNaAD4yHsk0Tn8DTYMdH7HEIV8dFvqJpZVDzYBzTlFKErnSlMxTys7QT3oe73vFQyhvwDBySz0RDtd1aWNYsWhVP0K4OEC/fRXI7rAgDMsyDrKrH1ASIH+Q+ilqh+KBXVN6bS5CsSeUfCzT7pW/3sC/4Wm4WUBJYH5iYf4=
- Thread-index: AQHXBHc+JFSp2vAJqEujEjOhByiWp6pa/zHO
- Thread-topic: [eigen] Eigen and GCC address sanitizer
Hello Joseph,
My experience is no - if you want to use Address Sanitizer, *ALL* your code must be compiled with it, otherwise you will hit false positives eventually. This is nothing specific to Eigen but will affect any library.
By coincidence I wrote a blog post about this and how I solve the problem at the weekend, you can find it here: https://spinicist.org.uk/posts/vcpkg-part2/
Good luck,
Toby
From: Joseph Mirabel <joseph.mirabel@xxxxxxx>
Date: Tuesday, 16 February 2021 at 15:20
To: eigen@xxxxxxxxxxxxxxxxxxx <eigen@xxxxxxxxxxxxxxxxxxx>
Subject: [eigen] Eigen and GCC address sanitizer
Dear Eigen developers,
Is it safe to compile a library using Eigen with option
`-fsanitize=address` and then to link this library to another library,
also using Eigen, which hasn't been compiled with this option ?
I have head-buffer-overflow errors coming from
Eigen::internal::handmade_aligned_free(void*), at
/usr/include/eigen3/Eigen/src/Core/util/Memory.h:98.