annotate configs/hybrid-nogprs @ 516:1ed9de6c90bd

src/g23m-gsm/sms/sms_for.c: bogus malloc removed The new error handling code that was not present in TCS211 blob version contains a malloc call that is bogus for 3 reasons: 1) The memory allocation in question is not needed in the first place; 2) libc malloc is used instead of one of the firmware's proper ways; 3) The memory allocation is made inside a function and then never freed, i.e., a memory leak. This bug was caught in gcc-built FreeCalypso fw projects (Citrine and Selenite) because our gcc environment does not allow any use of libc malloc (any reference to malloc produces a link failure), but this code from TCS3.2 is wrong even for Magnetite: if this code path is executed repeatedly over a long time, the many small allocations made by this malloc call without a subsequent free will eventually exhaust the malloc heap provided by the TMS470 environment, malloc will start returning NULL, and the bogus code will treat it as an error. Because the memory allocation in question is not needed at all, the fix entails simply removing it.
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 22 Jul 2018 06:04:49 +0000
parents fe200bd2f188
children 69e52afc01d5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
353
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 # TCS2/TCS3 hybrid config with GPRS disabled,
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 # but CSD and fax support (FAX_AND_DATA) still enabled
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3
394
fe200bd2f188 configs/*: converted to use scripts/config-headers-new.sh
Mychaela Falconia <falcon@freecalypso.org>
parents: 353
diff changeset
4 GPRS=0
fe200bd2f188 configs/*: converted to use scripts/config-headers-new.sh
Mychaela Falconia <falcon@freecalypso.org>
parents: 353
diff changeset
5 MMI=0
fe200bd2f188 configs/*: converted to use scripts/config-headers-new.sh
Mychaela Falconia <falcon@freecalypso.org>
parents: 353
diff changeset
6 SRVC=1
fe200bd2f188 configs/*: converted to use scripts/config-headers-new.sh
Mychaela Falconia <falcon@freecalypso.org>
parents: 353
diff changeset
7 export GPRS MMI SRVC
fe200bd2f188 configs/*: converted to use scripts/config-headers-new.sh
Mychaela Falconia <falcon@freecalypso.org>
parents: 353
diff changeset
8
fe200bd2f188 configs/*: converted to use scripts/config-headers-new.sh
Mychaela Falconia <falcon@freecalypso.org>
parents: 353
diff changeset
9 ATP_STATE=0
fe200bd2f188 configs/*: converted to use scripts/config-headers-new.sh
Mychaela Falconia <falcon@freecalypso.org>
parents: 353
diff changeset
10 FCHG_STATE=0
fe200bd2f188 configs/*: converted to use scripts/config-headers-new.sh
Mychaela Falconia <falcon@freecalypso.org>
parents: 353
diff changeset
11 LCC_STATE=0
fe200bd2f188 configs/*: converted to use scripts/config-headers-new.sh
Mychaela Falconia <falcon@freecalypso.org>
parents: 353
diff changeset
12 MKS_STATE=0
fe200bd2f188 configs/*: converted to use scripts/config-headers-new.sh
Mychaela Falconia <falcon@freecalypso.org>
parents: 353
diff changeset
13 PWR_STATE=0
fe200bd2f188 configs/*: converted to use scripts/config-headers-new.sh
Mychaela Falconia <falcon@freecalypso.org>
parents: 353
diff changeset
14 R2D_STATE=0
fe200bd2f188 configs/*: converted to use scripts/config-headers-new.sh
Mychaela Falconia <falcon@freecalypso.org>
parents: 353
diff changeset
15 export ATP_STATE FCHG_STATE LCC_STATE MKS_STATE PWR_STATE R2D_STATE
fe200bd2f188 configs/*: converted to use scripts/config-headers-new.sh
Mychaela Falconia <falcon@freecalypso.org>
parents: 353
diff changeset
16
fe200bd2f188 configs/*: converted to use scripts/config-headers-new.sh
Mychaela Falconia <falcon@freecalypso.org>
parents: 353
diff changeset
17 scripts/config-headers-new.sh
353
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 CONDAT=condat3
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 GPF=gpf3
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 CDGINC=cdg-hybrid/cdginc
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 CDGPRIM=cdg-hybrid/sap-inline
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 ACI=g23m-aci
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 export CONDAT GPF CDGINC CDGPRIM ACI
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 build_lib ccddata
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 # ACI libs
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 build_lib aci tcs3
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 build_lib aciext tcs3
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 build_lib aci_dti_mng tcs3
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 build_lib atiext tcs3
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 build_lib comlib hybrid
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 build_lib config_gsm_fl
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 build_lib config_gsm_ir
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 # G23M protocol stack libs
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 build_lib alr sotovik
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 build_lib cc
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 build_lib dl
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 build_lib dti
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 build_lib fad
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 build_lib l1_pei
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 build_lib l2r
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 build_lib mm
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 build_lib ra
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 build_lib rlp
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 build_lib rr
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 build_lib sim_b_lib
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 build_lib sms
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 build_lib ss
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 build_lib t30
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 build_lib uart_b_lib
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 # Condat drivers
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 build_lib gdi
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 # GPF
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 build_lib ccd_na7_db
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 blob_lib_gpf frame_na7_db_fl
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 blob_lib_custom blobs/patches/frame_na7_db_ir-systrace.lib frame_na7_db_ir
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 blob_lib_gpf misc_na7_db_fl
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 blob_lib_gpf misc_na7_db_ir
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 blob_lib_gpf osx_na7_db
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 blob_lib_gpf tif_na7_db_fl
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 blob_lib_gpf tif_na7_db_ir
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 # core drivers
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 build_lib drivers_flash
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 # Layer 1
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 build_lib tpudrv
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 build_lib l1_ext
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 lib_link_magic '(BSS_LIBS (.l1s_global))'
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 build_lib l1_int
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 build_lib l1_custom_ext
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 build_lib l1_custom_int
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 build_lib riviera_core_flash
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 build_lib riviera_cust_flash
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 # services
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 #build_lib atp
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 build_lib audio
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 build_lib audio_bgd
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 build_lib cst
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 build_lib dar
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 build_lib dar_gbl_var
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 lib_link_magic '(BSS_DAR_LIB (.bss))'
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 build_lib etm
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 build_lib lls
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 #build_lib mks
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 # app drivers
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 build_lib abb
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 build_lib buzzer
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 build_lib ffs
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 build_lib ffs_drv
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 build_lib ffs_pcm
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 build_lib kpd
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 #build_lib lcc
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 build_lib power
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 build_lib rtc_drv
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 build_lib sim_drv
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 build_lib spi_drv
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 build_lib uart_drv
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 # system glue
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 build_lib main init
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 build_lib bootloader
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 lib_link_magic '(CONST_BOOT_LIB (.const, .text, .text:v$3) BSS_BOOT_LIB (.bss))'
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 # Nucleus and TI's compiler stuff
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 blob_lib_os nucleus_flash_nodbg
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 blob_lib_os nucleus_int_ram_nodbg
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 lib_link_magic '(BSS_LIBS (.bss) CONST_LIBS (.text, .const))'
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 blob_lib_os rts16le_flash
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 blob_lib_os rts16le_int_ram
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 lib_link_magic '(BSS_LIBS (.bss))'
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128
e1bd1cca709e configs/hybrid-nogprs: compiles
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 str2ind_blobs_used=0