Gábor Szalai (a2570e9b) at 12 Jan 08:16
Attribute handling fix (issue #2)
Gábor Szalai (6b769f98) at 05 Jan 07:42
GTPC_Types: Add missing access_restriction_data field in MM Context IE
Gábor Szalai (a2570e9b) at 04 Jan 08:47
Gábor Szalai (a2570e9b) at 04 Jan 08:47
Attribute handling fix (issue #2)
Correct the encode and variant attributes to be compilable without -e
Gábor Szalai (6ecfb0a7) at 03 Jan 13:19
Correct the encode and variant attributes to be compilable without -e
Gábor Szalai (a2570e9b) at 03 Jan 10:16
Attribute handling fix (issue #2)
The CLL should be compatible with the TITAN's normal attribute handling and it should be compilable without -e.
Fix for PER enum encoder unitialized warning.
Gábor Szalai (6ecfb0a7) at 03 Jan 10:05
uninitialized warning fix (issue #710)
The PER encoder of the extended enumeration causes c++ warning like:
CAP_datatypes_CAPv4.cc: In member function ‘void CAP__datatypes__CAPv4::EventTypeBCSM::PER_encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int) const’:
CAP_datatypes_CAPv4.cc:22640:18: warning: ‘ext_bit’ may be used uninitialized in this function [-Wmaybe-uninitialized]
22640 | p_buf.PER_put_bit(ext_bit);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~
Example ASN.1 enum:
EventTypeBCSM ::= ENUMERATED {
collectedInfo (2),
analyzedInformation (3),
routeSelectFailure (4),
oCalledPartyBusy (5),
oNoAnswer (6),
oAnswer (7),
oMidCall (8),
oDisconnect (9),
oAbandon (10),
termAttemptAuthorized (12),
tBusy (13),
tNoAnswer (14),
tAnswer (15),
tMidCall (16),
tDisconnect (17),
tAbandon (18),
oTermSeized (19),
callAccepted (27),
oChangeOfPosition (50),
tChangeOfPosition (51),
...,
oServiceChange (52),
tServiceChange (53)
}
CAP_datatypes_CAPv4.cc: In member function ‘void CAP__datatypes__CAPv4::EventTypeBCSM::PER_encode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, int) const’:
CAP_datatypes_CAPv4.cc:22640:18: warning: ‘ext_bit’ may be used uninitialized in this function [-Wmaybe-uninitialized]
22640 | p_buf.PER_put_bit(ext_bit);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~
In ext_bit is not initialized if the value is unbound. It doesn't cause run time problem, just compile time warning.
no warning.
Initialize the ext_bit when declared.
10.0.0 & git head
/cc @aknappqwt @mmagyari
module proba {
type component CT {}
function f2(in @lazy charstring pl_message) runs on CT {
log(pl_message)
}
function f3(in charstring pl_message) runs on CT {
log(pl_message)
}
testcase TC4() runs on CT{
var CT c3:=CT.create()
c3.start(f3("f3"))
}
Try to run it. Result: Segmentation fault occurred
The generated code:
void start_f2(const COMPONENT& component_reference, Lazy_Fuzzy_Expr< CHARSTRING >* pl__message)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f2(");
((CHARSTRING&)pl__message).log();
So the code tries to use the Lazy_Fuzzy_Expr< CHARSTRING >* pointer as CHARSTRING&
It is not just warning. The generated code is fundamentally wrong.
The generated code compiled with warning: dereferencing type-punned pointer will break strict-aliasing rules if the optimalization level at least 2: compiled with -O2
module proba {
type component CT {}
function f2(in @lazy charstring pl_message) runs on CT {
log(pl_message)
}
}
g++ -c -DLINUX -I/home/ethgasz/TTCNv3/include -Wall -O2 -g -o proba.o proba.cc
proba.cc: In function ‘void proba::start_f2(const COMPONENT&, Lazy_Fuzzy_Expr<CHARSTRING>*)’:
proba.cc:3262:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
3262 | ((CHARSTRING&)pl__message).log();
| ^~~~~~~~~~~
proba.cc:3269:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
3269 | ((CHARSTRING&)pl__message).encode_text(text_buf);
| ^~~~~~~~~~~
proba.cc: In function ‘boolean proba::start_ptc_function(const char*, Text_Buf&)’:
proba.cc:3304:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
3304 | ((CHARSTRING&)pl__message).decode_text(function_arguments);
| ^~~~~~~~~~~
proba.cc:3307:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
3307 | ((CHARSTRING&)pl__message).log();
| ^~~~~~~~~~~
No g++ warning
latest head:
commit 999bffa6 (HEAD -> master, origin/master, origin/HEAD) Author: Botond Baranyi botond.baranyi@ericsson.com Date: Fri Oct 27 18:27:55 2023 +0200
Fixed lazy/fuzzy variables to work in redirects (issue #686)
Signed-off-by: Botond Baranyi <botond.baranyi@ericsson.com>
Yes, the INT1 pTI_Value, would be better. But please note, the compile time subtype checking of the TITAN is not complete. There are cases, which are not checked.
Gábor Szalai (66bc2c41) at 20 Sep 14:08
Fix LUDT and LUDTS pointer field values
The values encoded in the pointer fields were 1 byte too high.
Related: https://www.eclipse.org/forums/index.php?t=msg&th=1113664
Gábor Szalai (66fd5904) at 25 Aug 09:06
HTTP Client component updates
HTTP Client has some new functionality Signed-off-by: eantwuh antal.wu-hen-chang@ericsson.com