File: 0015-tsa2d32.cpp-Do-not-free-pointers-to-avoid-crash-on-a.patch

package info (click to toggle)
gcin 2.9.4%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 21,792 kB
  • sloc: cpp: 34,326; ansic: 9,319; makefile: 658; sh: 556
file content (36 lines) | stat: -rw-r--r-- 1,014 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: Boyuan Yang <byang@debian.org>
Date: Sun, 22 Dec 2024 17:41:21 -0500
Subject: tsa2d32.cpp: Do not free pointers to avoid crash on arm/ppc/riscv

In gcin/2.9.4+dfsg1-1, build fails on arm64/armel/armhf/ppc64el/
riscv64/s390x/hurd/ppc/ppc64 due to double free issues. As a result,
comment out the free() calls to circumvent this problem.

These calls appear in the main() function for tsa2d32 tool, and
the possible memory leakage is okay since the invocation of the
tool will not cause a longstanding process.

Bug not forwarded yet since the registration to upstream forum
always fails.

Bug-Debian: https://bugs.debian.org/1091160
Forwarded: no
---
 tsa2d32.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tsa2d32.cpp b/tsa2d32.cpp
index ceaebde..40bd5ae 100644
--- a/tsa2d32.cpp
+++ b/tsa2d32.cpp
@@ -787,8 +787,8 @@ int main(int argc, char **argv)
   printf("%d phrases\n",phcount);
 
   fclose(fw);
-  free(sf);
-  free(bf);
+//  free(sf);
+//  free(bf);
 
 
   if (reload) {