Calling the driver::finalize() method before returning from main
seems to be reducing some memory leaks of the driver (PR93019).
$ head -n20 before_patch.txt
==385521== Memcheck, a memory error detector
==385521== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==385521== Using Val
Use std::vector instead of malloc'd pointer
to get automatic freeing of memory.
Result was verified by valgrind, which showed
one less loss record.
I think Jonathan is/was working on this transition
but on a larger scale.
0001-driver-Fix-memory-leak.patch
Description: Binary data
Attached a new patch with these changes.
On Mon, 4 Dec 2023 at 12:15, Jonathan Wakely wrote:
> On Sat, 2 Dec 2023 at 21:24, Costas Argyris wrote:
> >
> > Use std::vector instead of malloc'd pointer
> > to get automatic freeing of memory.
>
> You can't inclu
irst place because it takes care of itself.
On Wed, 6 Dec 2023 at 14:39, Jakub Jelinek wrote:
> On Wed, Dec 06, 2023 at 02:29:25PM +, Costas Argyris wrote:
> > Attached a new patch with these changes.
> >
> > On Mon, 4 Dec 2023 at 12:15, Jonathan Wakely wrote:
> &
ere it doesn't get called as well, but from what you say
I take it that this case is not of interest.
On Thu, 7 Dec 2023 at 14:42, Jakub Jelinek wrote:
> On Thu, Dec 07, 2023 at 02:28:18PM +0000, Costas Argyris wrote:
> > Would that be something like this?
>
> Yes. Or p
Thanks for all the explanations.
In that case I restrict this patch to just freeing the buffer from
within driver::finalize only (I think it should be XDELETEVEC
instead of XDELETE, no?).
On Thu, 7 Dec 2023 at 15:42, Jakub Jelinek wrote:
> On Thu, Dec 07, 2023 at 03:16:29PM +0000, Cos
Does the simple XDELETEVEC patch need any more work?
I think it just fixes a leak for the JIT case where driver::finalize is
called.
On Thu, 7 Dec 2023 at 16:04, Jakub Jelinek wrote:
> On Thu, Dec 07, 2023 at 04:01:11PM +0000, Costas Argyris wrote:
> > Thanks for all the exp
This patch makes the inclusion of the utf8 manifest on the
mingw hosts optional by introducing the configure option
--disable-win32-utf8-manifest (has no effect on non-mingw
hosts).
Bootstrapped OK on i686-w64-mingw32 and x86_64-w64-mingw32
with and without --disable-win32-utf8-manifest.
Costas
e set before it sources config.host.
On Wed, 22 Nov 2023 at 01:17, Jonathan Yong <10wa...@gmail.com> wrote:
> On 11/21/23 18:07, Costas Argyris wrote:
> > This patch makes the inclusion of the utf8 manifest on the
> > mingw hosts optional by introducing the configure option
> &g
do
patch-wise?
Costas
On Thu, 23 Nov 2023 at 00:50, Jonathan Yong <10wa...@gmail.com> wrote:
> On 11/22/23 12:34, Costas Argyris wrote:
> > Attached a new patch.
> >
> > A couple things to note:
> >
> > 1) I changed your
> >
Thanks, here is the follow up patch for a couple typos in the same file.
On Mon, 5 Jun 2023 at 09:12, Jonathan Yong <10wa...@gmail.com> wrote:
> On 5/23/23 08:21, Jonathan Yong wrote:
> > On 5/22/23 13:25, Costas Argyris wrote:
> >> Currently on Windows, when Create
writeargv can be simplified by getting rid of the error exit mode
that was only relevant many years ago when the function used
to open the file descriptor internally.
From 1271552baee5561fa61652f4ca7673c9667e4f8f Mon Sep 17 00:00:00 2001
From: Costas Argyris
Date: Mon, 5 Jun 2023 15:02:06 +0100
You are right, this is also a remnant of the old function design
that I completely missed.Here is the follow-up patch for that.
Thanks for pointing it out.
Costas
On Tue, 6 Jun 2023 at 04:12, Jeff Law wrote:
>
>
> On 6/5/23 08:37, Costas Argyris via Gcc-patches wrote:
> > w
g it
a bit cleaner IMO.
Costas
From 4c84afd631ad09011b237790599e1c320852f82d Mon Sep 17 00:00:00 2001
From: Costas Argyris
Date: Wed, 7 Jun 2023 10:34:14 +0100
Subject: [PATCH] libiberty: pex-unix.c: Make pex_unix_cleanup signature always
match body.
Signed-off-by: Costas Argyris
---
libiberty/
Oh OK, thanks for the clarification.
Costas
On Wed, 7 Jun 2023 at 13:59, Jeff Law wrote:
>
>
> On 6/7/23 04:21, Costas Argyris via Gcc-patches wrote:
> > I saw this while working on something else:
> >
> > pex_unix_cleanup signature doesn't always match the
>
Some refactoring I thought would be useful while looking at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77576
I think some duplicated code can go away by doing this,
while also saving a bit of memory.
From c3f3b2fd53291805b5d0be19df6d1a348c5889ec Mon Sep 17 00:00:00 2001
From: Costas Argyris
the PR itself
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77576
On Fri, 7 Jul 2023 at 13:00, Costas Argyris
wrote:
> Bootstrapped successfully on x86_64-pc-linux-gnu
>
> On Fri, 7 Jul 2023 at 11:33, Costas Argyris
> wrote:
>
>> Problem: gcc-ar fails when a @file is passed t
ping
On Fri, 14 Jul 2023 at 09:05, Costas Argyris
wrote:
> Pinging to try and get this bug in gcc-ar fixed.
>
> Note that the patch posted as an attachment in
>
> https://gcc.gnu.org/pipermail/gcc-patches/2023-July/623400.html
>
> is exactly the same as the patch
Basically implementing what Andrew said in the PR:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77576
If @file has been passed to gcc-ar, do the following:
1) Expand it to get an argv without any @files.
2) Then apply the plugin modifications to argv.
3) Create temporary response file.
4) Put th
I should also add that for a rsp file that contains just "--version":
gcc-ar @rsp
fails without the patch (current problem) and successfully prints
the version info with it.
On Sat, 1 Jul 2023 at 22:45, Costas Argyris
wrote:
> Basically implementing what Andrew said in the
Problem: gcc-ar fails when a @file is passed to it:
$ cat rsp
--version
$ gcc-ar @rsp
/usr/bin/ar: invalid option -- '@'
This is because a dash '-' is prepended to the first
argument if it doesn't start with one, resulting in
the wrong call 'ar -@rsp'.
Fix: Expand argv to get rid of any @files a
Bootstrapped successfully on x86_64-pc-linux-gnu
On Fri, 7 Jul 2023 at 11:33, Costas Argyris
wrote:
> Problem: gcc-ar fails when a @file is passed to it:
>
> $ cat rsp
> --version
> $ gcc-ar @rsp
> /usr/bin/ar: invalid option -- '@'
>
> This is because a
code appearing just once
and is executed for all exit scenarios, reducing the likelihood of such
leaks in the future.
Thanks,
Costas
From ca1ff7b48db2e30963bd4c0e08ecd6653214a5db Mon Sep 17 00:00:00 2001
From: Costas Argyris
Date: Sun, 26 Feb 2023 16:34:11 +
Subject: [PATCH] libiberty: fix m
ar 2023 at 07:32, Richard Biener
wrote:
> On Wed, Mar 1, 2023 at 7:14 PM Costas Argyris via Gcc-patches
> wrote:
> >
> > Hi
> >
> > It seems that the win32_spawn function in libiberty/pex-win32.c is
> leaking
> > the cmdline buffer in 2/3 exit scenarios (it
Thanks for the review.
What is the next step please?
Thanks,
Costas
On Thu, 2 Mar 2023 at 10:08, Richard Biener
wrote:
> On Thu, Mar 2, 2023 at 10:21 AM Costas Argyris
> wrote:
> >
> > I forgot to mention that:
> >
> > 1) The CreateProcess documentation
> &g
This is a proposal to fix PR71850 by applying the existing logic for
passing include paths to cc1 to as.
Thanks,
Costas
From 393aff0d006ee9372cc8b9321c612c2dfb4b0a31 Mon Sep 17 00:00:00 2001
From: Costas Argyris
Date: Thu, 2 Mar 2023 18:27:22 +
Subject: [PATCH] driver: Treat include path
Hi
This is a proposal for addressing
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108865
by integrating the UTF-8 manifest file into gcc's build process for the
64-bit mingw host.
The analysis and discussion leading up to the latest patch are written in
the bug report.
The patch attached in th
Caban wrote:
> Hi Costas,
>
> On 3/7/23 01:52, Costas Argyris via Gcc-patches wrote:
>
> This is a proposal for addressing
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108865
>
> by integrating the UTF-8 manifest file into gcc's build process for the
> 64-bit mi
14:18, Jacek Caban wrote:
> Hi Costas,
>
> On 3/7/23 15:00, Costas Argyris wrote:
> > Hi Jacek,
> >
> > "Is there a reason to make it specific to x86_64? It seems to me that
> > all mingw hosts could use it."
> >
> > Are you referring to the 3
Added .manifest file to the make rule for utf8rc-mingw32.o, latest patch
attached.
On Tue, 7 Mar 2023 at 15:27, Costas Argyris
wrote:
> Hi Jacek,
>
> "but I think it should work just fine if you didn't explicitly limit the
> patch to x86_64."
>
> I would think
Pinging the list and mingw maintainer.
Analysis and pre-approval here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108865
On Wed, 8 Mar 2023 at 10:52, Costas Argyris
wrote:
> Added .manifest file to the make rule for utf8rc-mingw32.o, latest patch
> attached.
>
> On Tue, 7 Mar 2
Pinging list and driver reviewer.
Details here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71850
On Thu, 2 Mar 2023 at 19:25, Costas Argyris
wrote:
> This is a proposal to fix PR71850 by applying the existing logic for
> passing include paths to cc1 to as.
>
> Thanks,
>
e file and calls CreateProcess
with @file instead.
From 5c7237c102cdaca34e5907cd25c31610bda51919 Mon Sep 17 00:00:00 2001
From: Costas Argyris
Date: Mon, 22 May 2023 13:55:56 +0100
Subject: [PATCH] libiberty: On Windows, pass a >32k cmdline through a response
file.
pex-win32.c (win32_spawn): I
ping
On Thu, 9 Mar 2023 at 13:39, Costas Argyris
wrote:
> Pinging list and driver reviewer.
>
> Details here:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71850
>
> On Thu, 2 Mar 2023 at 19:25, Costas Argyris
> wrote:
>
>> This is a proposal to fix PR718
Patch to fix native Windows MSYS2 package build failures.
The patch has been confirmed by both original reporters in the
PRs, and myself.
cc'd mingw-w64 maintainer for mingw-w64-specific issue.
0001-Fix-native-MSYS2-build-failure-PR108865-PR109188.patch
Description: Binary data
pass them to the assembler.Note this is already
happening for the compiler, so this patch merely extends this logic to the
assembler.
Is there any reason not to go for it?
On Mon, 20 Mar 2023 at 09:47, Costas Argyris
wrote:
> ping
>
> On Thu, 9 Mar 2023 at 13:39, Costas Argyris
could make it conditional on
the version then even those with earlier version wouldn't break,
they would just get the current behavior.
On Mon, 27 Mar 2023 at 11:00, Xi Ruoyao wrote:
> On Mon, 2023-03-27 at 10:36 +0100, Costas Argyris via Gcc-patches wrote:
> > [ping^3]
> >
&g
ake
2) native-compilation from a Windows machine using MSYS2
On Thu, 9 Mar 2023 at 15:03, Jonathan Yong <10wa...@gmail.com> wrote:
> On 3/9/23 13:33, Costas Argyris wrote:
> > Pinging the list and mingw maintainer.
> >
> > Analysis and pre-approval here:
>
I forgot to update the relevant comments with the previous patch.
This is a comment-only patch that brings them up-to-date.
On Tue, 28 Mar 2023 at 09:05, Jonathan Yong <10wa...@gmail.com> wrote:
> On 3/27/23 17:17, Costas Argyris wrote:
> > The patch attached to this email ex
This is proposed to fix PR109460 where an older version of
gcc (7.3) was used to build for windows (mingw) host.
From e5b608072f80a83cca65e88bb75ecc62ab0bbb87 Mon Sep 17 00:00:00 2001
From: Costas Argyris
Date: Wed, 12 Apr 2023 08:48:18 +0100
Subject: [PATCH] mingw: Support building with older
40 matches
Mail list logo