titan.core issueshttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues2024-03-27T16:52:57Zhttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/721Error when generating PER descriptor containing reference to a constant in an...2024-03-27T16:52:57ZBotond BaranyiError when generating PER descriptor containing reference to a constant in another module## Summary
ASN.1 type constraints can contain references to constants, which are generated into the C++ code if these constraints are relevant to PER. If the referenced constant is defined in another ASN.1 module, then the compiler cras...## Summary
ASN.1 type constraints can contain references to constants, which are generated into the C++ code if these constraints are relevant to PER. If the referenced constant is defined in another ASN.1 module, then the compiler crashes with a fatal error.
## Steps and/or TTCN-3 code to reproduce
Imported module:
`objid-val OBJECT IDENTIFIER ::= { itu-t(0) recommendation(0) a(1) b(3) }`
Importing module:
`CharStr ::= CHARACTER STRING ( WITH COMPONENTS { identification ( syntaxes: { abstract objid-val, transfer objid-val } ) } )`
## What is the current bug behavior?
Compiler crashes with a fatal error
## What is the expected correct behavior?
Successful code generation
## Relevant logs and/or screenshots
-
## Possible fixes
Implement Ref_defd::generate_code_const_ref()
## Titan version
10.0.0
## Platform details (OS type and version)
Ubuntu 22.04
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/720PER_ALIGNED is used incorrectly2024-03-19T07:23:14ZCsaba RádulyPER_ALIGNED is used incorrectly## Summary
PER_ALIGNED is used incorrectly in several places
## Steps and/or TTCN-3 code to reproduce
In several places, the expression `(p_options && PER_ALIGNED)` is used. Using logical `&&` with a constant operand is incorrect.
The...## Summary
PER_ALIGNED is used incorrectly in several places
## Steps and/or TTCN-3 code to reproduce
In several places, the expression `(p_options && PER_ALIGNED)` is used. Using logical `&&` with a constant operand is incorrect.
The value of `PER_ALIGNED` is `0x01`, so this expression is true if `p_options` is not zero.
Bitwise `&` was likely intended.
## What is the current bug behavior?
Aligned PER encoding will be used when canonical PER is requested.
## What is the expected correct behavior?
Aligned PER encoding not used when only canonical PER is requested.
## Relevant logs and/or screenshots
-
## Possible fixes
Change `(p_options && PER_ALIGNED)` to `(p_options & PER_ALIGNED)`
```
core/Bitstring.cc:1432
core/Bitstring.cc:1484
core/Charstring.cc:1980
core/Charstring.cc:2333
core/Octetstring.cc:1549
core/Octetstring.cc:1594
core/Universal_charstring.cc:3297
core/Universal_charstring.cc:3371
```
## Titan version
Commit 129c715f0
## Platform details (OS type and version)
Any
/cc @aknappqwt @mmagyariAdam KnappAdam Knapphttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/719PER: extension groups with one field2024-03-27T16:52:57ZBotond BaranyiPER: extension groups with one fieldThe current PER encoder for sequences/sets treats extension groups with one field as if they were single extensions.
Example:
```
Seq ::= SEQUENCE {
...,
f1 BIT STRING (SIZE (1..8)) OPTIONAL,
[[ f2 BIT STRING (SIZE (1..8)) OPTIONA...The current PER encoder for sequences/sets treats extension groups with one field as if they were single extensions.
Example:
```
Seq ::= SEQUENCE {
...,
f1 BIT STRING (SIZE (1..8)) OPTIONAL,
[[ f2 BIT STRING (SIZE (1..8)) OPTIONAL ]]
}
```
In this example f1 needs to be encoded as if it was a field in the sequence, while f2 needs to be encoded as if it was a sequence with one field (including the optional bit). Currently both f1 and f2 are encoded as if they were fields.
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/718PER: remove trailing 0 bits from bitstrings2024-03-27T14:41:45ZBotond BaranyiPER: remove trailing 0 bits from bitstringsAccording to the PER standard:
"Where there are no PER-visible constraints and Rec. ITU-T X.680 | ISO/IEC 8824-1, 22.7, applies the value
shall be encoded with no trailing 0 bits (note that this means that a value with no 1 bits is alw...According to the PER standard:
"Where there are no PER-visible constraints and Rec. ITU-T X.680 | ISO/IEC 8824-1, 22.7, applies the value
shall be encoded with no trailing 0 bits (note that this means that a value with no 1 bits is always encoded as an empty bit
string).
Where there is a PER-visible constraint and Rec. ITU-T X.680 | ISO/IEC 8824-1, 22.7, applies (i.e., the bitstring
type is defined with a "NamedBitList"), the value shall be encoded with trailing 0 bits added or removed as necessary to
ensure that the size of the transmitted value is the smallest size capable of carrying this value and satisfies the effective
size constraint."
The current version of the PER encoder does not remove trailing 0 bits in any situation.
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/717Configurable lib folder for OpenSSL to handle OpenSSL32024-03-19T07:23:19ZAdam KnappConfigurable lib folder for OpenSSL to handle OpenSSL3Depending on the install configuration, OpenSSL3 might use `lib64` folder instead of `lib`. In our Makefiles, `lib` is used. The proposed solution is to introduce a new variable `OPENSSL_LIB_DIR` that can be overwritten in the `Makefile....Depending on the install configuration, OpenSSL3 might use `lib64` folder instead of `lib`. In our Makefiles, `lib` is used. The proposed solution is to introduce a new variable `OPENSSL_LIB_DIR` that can be overwritten in the `Makefile.personal` on demand.Adam KnappAdam Knapphttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/716ttcn3_logformat different otput format during unmatched text string2024-02-26T13:05:06ZPau Espin Pedrolttcn3_logformat different otput format during unmatched text string## Summary
In "unmatched: First message in the queue does not match the template" log lines, ttcn3_logformat prints output formatted differently:
- As "}\\n,{" in the "got" section
- As "}, {" in the "exp" section.
## Steps and/or TTC...## Summary
In "unmatched: First message in the queue does not match the template" log lines, ttcn3_logformat prints output formatted differently:
- As "}\\n,{" in the "got" section
- As "}, {" in the "exp" section.
## Steps and/or TTCN-3 code to reproduce
Take a long log line printing a "unmatched: First message in the queue does not match the template" case (see log.merged attached). This is basically of the sort "\[...\] with \[...\] format. I run ttcn3_logformat on it. I split manually the text into "got" file, and the text into the "exp" case. I use "meld" difftool to figure out the difference between the received (got) and expected (exp) message. Lot of lines differ, because the text is formatted as "}\\n,{", while the text is formatted as "}, {".
Not sure if the difference is due to "got" vs "exp" sections, or because the "exp" has the AVPs inside a "superset".
## What is the current bug behavior?
Different whitespace formatting is printed by ttcn3_logformat when re-encoding the same line.
## What is the expected correct behavior?
The same format should be applied for whitespace everywhere to make diffing easy.
## Relevant logs and/or screenshots
See attached files:
[exp.txt](/uploads/541d59a1c52b72f365be9bbe7e36d662/exp.txt)
[got.txt](/uploads/89865ab1a2e426b93fb430f46922fe65/got.txt)
[log.merged](/uploads/73eb0a1635c1316c15e9c18a09f33274/log.merged)
[ttcn3_format_output.txt](/uploads/5460e9b274cce8f6a2dc76cbaa7ef18f/ttcn3_format_output.txt)
## Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
## Titan version
```plaintext
$ ttcn3_compiler -v
TTCN-3 and ASN.1 Compiler for the TTCN-3 Test Executor
Version: 9.0.0
Build date: Sep 22 2023 23:38:05
Compiled with: GCC 13.2.1
Using OpenSSL 3.2.1 30 Jan 2024
Commit id: 67573c4
Copyright (c) 2000-2023 Ericsson Telecom AB
```
## Platform details (OS type and version)
Linux.
/cc @aknappqwt @mmagyarihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/711Unchecked module's attributes should not be cached2024-01-11T17:28:27ZBotond BaranyiUnchecked module's attributes should not be cachedA module's extension attributes can be cached (i.e. stored after they are first calculated, so they don't have to be calculated every time they're requested) before the semantic analysis of these attributes changes them (i.e. deletes som...A module's extension attributes can be cached (i.e. stored after they are first calculated, so they don't have to be calculated every time they're requested) before the semantic analysis of these attributes changes them (i.e. deletes some of them).
Consider the following example:
A.ttcn:
```
module A {
import from B all;
type record of Rec RoRec
with { encode "JSON" }
}
```
B.ttcn:
```
module B {
import from A all;
type record Rec {
integer num,
charstring str
}
external function f_enc(in Rec x) return octetstring
with { extension "prototype(convert) encode(RAW)" };
}
with {
encode "RAW"
extension "version R3A"
}
```
The following steps take place, when semantic analysis reaches module B:
- the check for imported module A is intiated (before module B itself is checked),
- the check for type RoRec in module A is initiated,
- the check for type Rec in module B is initiated (because it is contained in type RoRec),
- while checking type Rec's encodings, the parent module's attributes are calculated and cached, before the module has checked them (this results in a vector of 2 attributes, one 'encode' and one 'extension'),
- the check for type RoRec and module A is finished,
- the check for module B is initiated,
- module B's attributes are checked, this results in the extension attribute being deallocated,
- external function f_enc is checked, which requests the parent module's attributes, which returns the previously cached attributes.
The result a fatal error, because the 2nd attribute in the cache has already been deallocated.
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/710warning: ‘ext_bit’ may be used uninitialized in this function2024-01-23T13:59:30ZGábor Szalaiwarning: ‘ext_bit’ may be used uninitialized in this function## Summary
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) cons...## Summary
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);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~
```
## Steps and/or TTCN-3 code to reproduce
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)
}
```
## What is the current bug behavior?
```
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.
## What is the expected correct behavior?
no warning.
## Possible fixes
Initialize the ext_bit when declared.
## Titan version
10.0.0 & git head
/cc @aknappqwt @mmagyariGábor SzalaiGábor Szalaihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/709Isvalue function causes segmentation fault2023-12-15T12:29:14ZAdam KnappIsvalue function causes segmentation faultSee: https://www.eclipse.org/forums/index.php/t/1114083/See: https://www.eclipse.org/forums/index.php/t/1114083/Adam KnappAdam Knapphttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/708Sizeof function causes fatal error2023-12-05T13:59:24ZAdam KnappSizeof function causes fatal error## Summary
In certain cases, when a function returns template and the sizeof function is used on the returning template causes FATAL_ERROR in the compiler stopping the code generation completely.
## Steps and/or TTCN-3 code to reproduc...## Summary
In certain cases, when a function returns template and the sizeof function is used on the returning template causes FATAL_ERROR in the compiler stopping the code generation completely.
## Steps and/or TTCN-3 code to reproduce
The following code reproduces the issue:
```
// lengthof and sizeof (with functions returning templates)
type record Rec {
integer a optional,
boolean b
}
type record of Rec Rec_of;
function f2() return template Rec_of {
var template Rec_of x;
x[0].a := 0;
x[0].b := ?;
x[1].a := omit;
x[1].b := false;
return x;
}
function f3() return template Rec {
var template Rec t_rec := { ?, true };
return t_rec;
}
template Rec_of RoIret_global := f2();
template Rec rec_global := f3();
testcase tc_predef_sizeof_lengthof_func_rtemp() runs on CT {
template Rec_of RoIret_local := f2();
var template Rec_of RoIret_local_var := f2();
var integer size := lengthof(RoIret_global);
if (size != 2) {
setverdict(fail, "#1: ", size);
}
size := lengthof(RoIret_local);
if (size != 2) {
setverdict(fail, "#2: ", size);
}
size := lengthof(RoIret_local_var);
if (size != 2) {
setverdict(fail, "#3: ", size);
}
size := sizeof(rec_global);
if (size != 2) {
setverdict(fail, "#4: ", size);
}
size := sizeof(RoIret_global);
if (size != 2) {
setverdict(fail, "#5: ", size);
}
size := sizeof(RoIret_local);
if (size != 2) {
setverdict(fail, "#6: ", size);
}
size := sizeof(RoIret_local_var);
if (size != 2) {
setverdict(fail, "#7: ", size);
}
setverdict(pass);
}
```
## What is the current bug behavior?
FATAL_ERROR happens
## What is the expected correct behavior?
Compile without error
## Titan version
Titan 9.0.0
/cc @aknappqwtBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/707Compiler issue: compilation is blocked using 100% of the CPU2023-11-15T15:08:31ZBotond BaranyiCompiler issue: compilation is blocked using 100% of the CPUSee: https://www.eclipse.org/forums/index.php/t/1113807/
/cc @aknappqwt @mmagyariSee: https://www.eclipse.org/forums/index.php/t/1113807/
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/698Compilation warnings with Clang2023-04-28T10:01:06ZAsmelash Tsegay GebretsadkanCompilation warnings with Clang## Summary
We built the latest Titan with Clang14.0.6 and used it to compile our TTCN code. Some of the generated C++ codes (even code included from Titan) caused Clang to complain. Sample of the generated warnings:
- S1AP_IEs.hh:78971...## Summary
We built the latest Titan with Clang14.0.6 and used it to compile our TTCN code. Some of the generated C++ codes (even code included from Titan) caused Clang to complain. Sample of the generated warnings:
- S1AP_IEs.hh:78971:1: warning: declaration does not declare anything [-Wmissing-declarations] union { ^
- S1AP_IEs.cc:505086:37: warning: result of comparison of constant 128 with expression of type 'const S1AP__IEs::M3period::enum_type' is always true [-Wtautological-constant-out-of-range-compare]
- IP_Types.cc:5102:7: warning: variable 'value_of_length_field1' set but not used [-Wunused-but-set-variable]
- titan/8.3.0-rhel7-clang14.0.6-8103cc9-dirty/64_bit/include/Struct_of.hh:32:1: warning: class 'dynmatch_dummy_struct' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
- titan/8.3.0-rhel7-clang14.0.6-8103cc9-dirty/64_bit/include/Port.hh:150:16: note: hidden overloaded virtual function 'PORT::log' declared here: different number of parameters (0 vs 1)
virtual void log() const;
^
## Steps and/or TTCN-3 code to reproduce
(How one can reproduce the issue - this is very important)
(Please use code blocks (```) to format the code if provided.)
- Build Titan (from master) with Clang14.0.6
- Build the TTCN/ASN code with Titan
## What is the current bug behavior?
Clang complains when compiling the generated C++ code.
## What is the expected correct behavior?
No warnings when the generated C++ code is compiled with Clang.
## Relevant logs and/or screenshots
The relevant files are attached.
## Possible fixes
NA
## Titan version
```
TTCN-3 and ASN.1 Compiler for the TTCN-3 Test Executor
Version: 8.3.0
Build date: Mar 22 2023 13:27:49
Compiled with: clang 14.0.6
Using OpenSSL 1.1.1g 21 Apr 2020
Commit id: 8103cc9-dirty
```
## Platform details (OS type and version)
```
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 7.9 (Maipo)
Release: 7.9
Codename: Maipo
```
[titan_issues.tar.gz](/uploads/ef5b55441c93e8b619650d087d2d2e17/titan_issues.tar.gz)https://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/684Compiler does not work if workspace path contains spaces.2023-01-27T08:12:58ZLevente ErősCompiler does not work if workspace path contains spaces.## Summary
If you set your workspace to a path containing a space, the compiler does not work.
## Steps and/or TTCN-3 code to reproduce
Set your workspace to a path containing a space, for instance ```C:\Users\lee\MUNKA_NOBACKUP\_SWAT...## Summary
If you set your workspace to a path containing a space, the compiler does not work.
## Steps and/or TTCN-3 code to reproduce
Set your workspace to a path containing a space, for instance ```C:\Users\lee\MUNKA_NOBACKUP\_SWAT\TITAN\test wsp```. (Don't worry, I do have backup, a manual, daily one, because of this exact reason -- the automatically synced folders on my machine have spaces in their paths.)
Then create any compilable TTCN-3 module, for example:
```
module asdf {
control{
log("A");
}
}
```
Then compile.
## What is the current bug behavior?
Compilation fails.
## What is the expected correct behavior?
Compilation succeeds.
## Relevant logs and/or screenshots
```
**************************************************************
2023-01-26_10:59:43: starting to build asdf
**************************************************************
sh -c make dep
Makefile:137: warning: overriding recipe for target '/cygdrive/c/Users/lee/MUNKA_NOBACKUP/_SWAT/TITAN/test'
Makefile:130: warning: ignoring old recipe for target '/cygdrive/c/Users/lee/MUNKA_NOBACKUP/_SWAT/TITAN/test'
/home/lee/git/titan.core/Install/bin/compiler \
../src/asdf.ttcn - ../src/asdf.ttcn
Notify: Parsing TTCN-3 module `../src/asdf.ttcn'...
Notify: Checking modules...
Notify: Generating code...
Notify: File `asdf.cc' was updated.
Notify: 1 file was updated.
touch compile
makedepend -DWIN32 -I. -I/home/lee/git/titan.core/Install/include -I. -DMAKEDEPEND_RUN asdf.cc
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/Types.h, line 37): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/Vector.hh, line 21): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/JSON_Tokenizer.hh, line 18): cannot find include file "cstddef"
not in ./cstddef
not in /home/lee/git/titan.core/Install/include/cstddef
not in ./cstddef
not in /usr/include/cstddef
makedepend: warning: asdf.cc (reading /usr/include/sys/cdefs.h, line 47): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /usr/include/stdio.h, line 36): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /usr/include/stdio.h, line 40): cannot find include file "stdarg.h"
not in ./stdarg.h
not in /home/lee/git/titan.core/Install/include/stdarg.h
not in ./stdarg.h
not in /usr/include/stdarg.h
makedepend: warning: asdf.cc (reading /usr/include/sys/reent.h, line 14): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /usr/include/sys/_types.h, line 24): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /usr/include/stdlib.h, line 16): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/Logger.hh, line 28): cannot find include file "stdarg.h"
not in ./stdarg.h
not in /home/lee/git/titan.core/Install/include/stdarg.h
not in ./stdarg.h
not in /usr/include/stdarg.h
makedepend: warning: asdf.cc (reading /usr/include/time.h, line 16): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/Param_Types.hh, line 20): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/memory.h, line 18): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/memory.h, line 19): cannot find include file "stdarg.h"
not in ./stdarg.h
not in /home/lee/git/titan.core/Install/include/stdarg.h
not in ./stdarg.h
not in /usr/include/stdarg.h
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/Param_Types.hh, line 25): cannot find include file "cstdio"
not in ./cstdio
not in /home/lee/git/titan.core/Install/include/cstdio
not in ./cstdio
not in /usr/include/cstdio
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/XER.hh, line 20): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /usr/include/string.h, line 17): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/Port.hh, line 27): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /usr/include/sys/_intsup.h), line 71: #error "Unable to determine type definition of intptr_t"
makedepend: warning: asdf.cc (reading /usr/include/sys/_intsup.h), line 78: #error "Unable to determine type definition of int32_t"
makedepend: warning: asdf.cc (reading /usr/include/stdint.h), line 170: #error required type int_least8_t missing
makedepend: warning: asdf.cc (reading /usr/include/stdint.h), line 192: #error required type int_least16_t missing
makedepend: warning: asdf.cc (reading /usr/include/stdint.h), line 226: #error required type int_least32_t missing
"/usr/include/stdint.h":364: defined(__WCHAR_UNSIGNED__) || (L'\0' - 1 > 0)
^--- expecting )
"/usr/include/stdint.h":375: defined(__WCHAR_UNSIGNED__) || (L'\0' - 1 > 0)
^--- expecting )
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/OOP.hh, line 18): cannot find include file "functional"
not in ./functional
not in /home/lee/git/titan.core/Install/include/functional
not in ./functional
not in /usr/include/functional
Operation finished successfully.
sh -c make all -j 8
Makefile:137: warning: overriding recipe for target '/cygdrive/c/Users/lee/MUNKA_NOBACKUP/_SWAT/TITAN/test'
Makefile:130: warning: ignoring old recipe for target '/cygdrive/c/Users/lee/MUNKA_NOBACKUP/_SWAT/TITAN/test'
g++ -c -DWIN32 -I. -I/home/lee/git/titan.core/Install/include -I. -Wall -O2 -o asdf.o asdf.cc
ar -r /cygdrive/c/Users/lee/MUNKA_NOBACKUP/_SWAT/TITAN/test wsp/asdf/bin/asdf.a asdf.o
g++ -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc -o wsp/asdf/bin/asdf.exe asdf.o \
-L/home/lee/git/titan.core/Install/lib -L/home/lee/git/titan.core/Install/lib -L/home/lee/git/titan.core/Install/lib \
-lttcn3-parallel -lcrypto \
-lxml2 \
|| if [ -f /home/lee/git/titan.core/Install/bin/titanver ]; then /home/lee/git/titan.core/Install/bin/titanver asdf.o ; else : ; fi
ar: creating /cygdrive/c/Users/lee/MUNKA_NOBACKUP/_SWAT/TITAN/test
ar: wsp/asdf/bin/asdf.a: No such file or directory
make: *** [Makefile:137: /cygdrive/c/Users/lee/MUNKA_NOBACKUP/_SWAT/TITAN/test] Error 1
make: *** Waiting for unfinished jobs....
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: cannot open output file wsp/asdf/bin/asdf.exe: No such file or directory
collect2: error: ld returned 1 exit status
Operation failed with return value: 2
```
It seems the compiler only takes into account the part of the path coming before or after the space.
## Possible fixes
## Titan version
8.1.0
## Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyarihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/682Titan does not follow the standard wrt timer, component and port type constants.2023-01-25T14:49:38ZLevente ErősTitan does not follow the standard wrt timer, component and port type constants.## Summary
Titan does not allow for timer, and port type constants, while the TTCN-3 standard implies otherwise: "The only value that can be assigned to global constants of default, component, port or timer type or
component constants o...## Summary
Titan does not allow for timer, and port type constants, while the TTCN-3 standard implies otherwise: "The only value that can be assigned to global constants of default, component, port or timer type or
component constants of default or component types is the special value null." (Section 10, NOTE)
## Steps and/or TTCN-3 code to reproduce
Create a module and insert these rows:
```
type port mypt message{
inout charstring
}with{extension "internal"}
type component ct_empty{}
const default d := null;
const mypt p := null;
const ct_empty c := null;
const timer t := null;
```
The same happens if these constants are put in a component type, like:
```
type component ct_myctf{
const default d := null;
const mypt p := null;
const ct_empty c := null;
const timer t := null;
}
```
## What is the current bug behavior?
The port, and timer constants cause errors. However, they should be allowed in case being assigned the null value.
## What is the expected correct behavior?
None of the above lines should cause errors. Furthermore note:
- global default, component, port or timer type constants can only be assigned the null value
- current status: port and timer constants are not accepted on module level (note: except for default, there is no other possible value than null, on global level)
- component-level port or timer type constants can be assigned non-null values
- for port type constants, only non-null values are accepted on component level.
- for timer type constants, nothing is accepted on component level (there is no such thing as timer type btw)
- component-level default or component type constants can only be assigned the null value
- this seems to work.
## Relevant logs and/or screenshots
## Possible fixes
## Titan version
8.1.0
## Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyarihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/671isvalue yields error for non-chosen field, while it should return false2023-11-20T07:33:07ZLevente Erősisvalue yields error for non-chosen field, while it should return false## Summary
According to Section 7.1.8.4, EXAMPLE 3, isvalue should yield false if its parameter is a non-chosen (sub)field of a union. Titan however, returns an error because of the referenced field not being the chosen one.
## Steps a...## Summary
According to Section 7.1.8.4, EXAMPLE 3, isvalue should yield false if its parameter is a non-chosen (sub)field of a union. Titan however, returns an error because of the referenced field not being the chosen one.
## Steps and/or TTCN-3 code to reproduce
```
type union MyUnion_isv {
integer ch1,
integer ch2
}
template MyUnion_isv mw_myUnion := { ch1 := ? }
type record MyRecord_isv {
MyUnion_isv u optional
}
template MyRecord_isv mw_myRecord := { u := mw_myUnion }
testcase isvalue_fun() runs on ct_empty{
var boolean v_checkResult := isvalue(mw_myUnion.ch2); // yields false
if(not v_checkResult){setverdict(pass);}else{setverdict(fail);}
v_checkResult := isvalue(mw_myRecord.u.ch2); // yields false
if(not v_checkResult){setverdict(pass);}else{setverdict(fail);}
v_checkResult := isvalue(m_myRecord.u.ch2); // yields false
if(not v_checkResult){setverdict(pass);}else{setverdict(fail);}
}
```
## What is the current bug behavior?
Error.
## What is the expected correct behavior?
Pass.
## Relevant logs and/or screenshots
```
../src/operators.ttcn:353.51-53: error: Reference to inactive field `ch2' in a template of union type `@operators.MyUnion_isv'. The active field is `ch1'.
```
## Possible fixes
## Titan version
8.1.0
## Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/670Rotate does not work well on partly initialized record ofs, set ofs, and arrays2023-11-20T07:32:34ZLevente ErősRotate does not work well on partly initialized record ofs, set ofs, and arrays## Summary
According to Section 7.1.7 of the TTCN-3 standard, "When the rotate operator is used for record of-s, set of-s and arrays, its left hand operand shall be at least partially initialized." However, it does not work, only with f...## Summary
According to Section 7.1.7 of the TTCN-3 standard, "When the rotate operator is used for record of-s, set of-s and arrays, its left hand operand shall be at least partially initialized." However, it does not work, only with fully initialized data elements.
## Steps and/or TTCN-3 code to reproduce
```
type record of integer ROI;
type set of integer SOI;
testcase rotatopsub() runs on ct_empty{
var integer uiarray[3], rot_uiarray[3];
uiarray[0] := 1;
uiarray[2] := 3;
var ROI uiro, rot_uiro;
uiro[0] := 1;
uiro[2] := 3;
var SOI uiso, rot_uiso;
uiso[0] := 1;
uiso[2] := 3;
rot_uiarray := uiarray @> 2;
rot_uiro := uiro @> 2;
rot_uiso := uiso @> 2;
/* if(rot_uiarray[0].isbound){setverdict(pass);}else{setverdict(fail);}
if(rot_uiro[0].isbound){setverdict(pass);}else{setverdict(fail);}
if(rot_uiso[0].isbound){setverdict(pass);}else{setverdict(fail);}
*/
}
```
## What is the current bug behavior?
Runtime error, and after uncommenting the last 3 rows, compile error.
## What is the expected correct behavior?
Pass.
## Relevant logs and/or screenshots
```
MTC@HUL21014: Dynamic test case error: Assignment of an unbound integer value.
```
## Possible fixes
## Titan version
8.1.0
## Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/669evaluation does not stop where it should2023-11-17T07:10:28ZLevente Erősevaluation does not stop where it should## Summary
According section 7.1.4 of the TTCN-3 standard, "Short circuit evaluation for boolean expressions is used, i.e. the evaluation of operands of logical operators is stopped once the overall result is known: in the case of the a...## Summary
According section 7.1.4 of the TTCN-3 standard, "Short circuit evaluation for boolean expressions is used, i.e. the evaluation of operands of logical operators is stopped once the overall result is known: in the case of the and operator, if the left argument evaluates to false, then the right argument is not evaluated and the whole expression evaluates to false. In the case of the or operator, if the left argument evaluates to true, then the right argument is not evaluated and the whole expression evaluates to true."
## Steps and/or TTCN-3 code to reproduce
```
testcase logicalops() runs on ct_empty{
var integer v:=0;
var integer u:=0;
if(true or (u/v==1)){setverdict(pass);}else{setverdict(fail);}
if(not(false or (u/v==1))){setverdict(pass);}else{setverdict(fail);}
}
```
## What is the current bug behavior?
Pass
## What is the expected correct behavior?
Error, as there is a division by 0 in the 2nd operand -- but this operand shall not be reached during evaluation
## Relevant logs and/or screenshots
## Possible fixes
## Titan version
8.1.0
## Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/668compound type compatibility contradicts standars2023-11-22T07:18:38ZLevente Erőscompound type compatibility contradicts standars## Summary
According to section 7.1.3 of the TTCN-3 standard, "If there is a compound expression on both sides of the comparison operator, they shall both be value list notation expressions where the elements shall be of the same root t...## Summary
According to section 7.1.3 of the TTCN-3 standard, "If there is a compound expression on both sides of the comparison operator, they shall both be value list notation expressions where the elements shall be of the same root type and they shall be compared like record of values with elements of that root type." This doesn't seem to work in Titan.
## Steps and/or TTCN-3 code to reproduce
```
testcase compoundeq() runs on ct_empty{
if({1,2,3}=={1,2,3){setverdict(pass);}else{setverdict(fail);}
}
```
## What is the current bug behavior?
Error
## What is the expected correct behavior?
Pass
## Relevant logs and/or screenshots
```
../src/datatypes.ttcn:782.21: error: at or before token `)': syntax error
```
## Possible fixes
## Titan version
8.1.0
## Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyariBotond BaranyiBotond Baranyihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/667Timers cannot be compared to each other, and neither can ports be2024-02-01T09:58:28ZLevente ErősTimers cannot be compared to each other, and neither can ports be## Summary
Comparing ports and timers lead to error.
## Steps and/or TTCN-3 code to reproduce
```
type port pt message{inout integer}with{extension "internal";}
type component oneport{
port pt P
port pt Q
}
testcase compporteq()...## Summary
Comparing ports and timers lead to error.
## Steps and/or TTCN-3 code to reproduce
```
type port pt message{inout integer}with{extension "internal";}
type component oneport{
port pt P
port pt Q
}
testcase compporteq() runs on oneport{
timer t := 0.5;
timer v := 0.5;
if(t!=v){setverdict(pass);}else{setverdict(fail);}
if(P!=Q){setverdict(pass);}else{setverdict(fail);}
if(P==Q){setverdict(pass);}else{setverdict(fail);}
}
```
## What is the current bug behavior?
The above code fails to build (compile error).
## What is the expected correct behavior?
pass
## Relevant logs and/or screenshots
```
../src/datatypes.ttcn: In TTCN-3 module `datatypes':
../src/datatypes.ttcn:757.1-779.1: In testcase definition `compporteq':
../src/datatypes.ttcn:776.3-29: In if statement:
../src/datatypes.ttcn:776.6: error: Reference to a value was expected instead of timer `t'
../src/datatypes.ttcn:777.3-29: In if statement:
../src/datatypes.ttcn:777.6: error: Reference to a value was expected instead of port `@datatypes.oneport.P'
../src/datatypes.ttcn:778.3-29: In if statement:
../src/datatypes.ttcn:778.6: error: Reference to a value was expected instead of port `@datatypes.oneport.P'
```
## Possible fixes
## Titan version
8.1.0
## Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyarihttps://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/666Enumerated compatibility is too restrictive2024-01-15T16:49:30ZLevente ErősEnumerated compatibility is too restrictive## Summary
According to section 7.1.3 of the standard, same values of different enumerated types are equal if name and id are same and the two types can be converged into a consistent type (no name-id contradictions appear). Titan does ...## Summary
According to section 7.1.3 of the standard, same values of different enumerated types are equal if name and id are same and the two types can be converged into a consistent type (no name-id contradictions appear). Titan does not accept the equality check of two non-identical enumerated types though.
Note: The standard contradicts itself here: 6.2.4. contradicts the above section.
## Steps and/or TTCN-3 code to reproduce
```
type component ct_empty{}
type enumerated enum1 {egyes(1), kettes(2)};
type enumerated enum2 {kettes(2), harmas (3)};
testcase alloperators() runs on ct_empty{
var enum1 e1 := kettes;
var enum2 e2 := kettes;
if(e1==e2){setverdict(pass);}else{setverdict(fail);}
}
control{
execute(alloperators());
}
```
## What is the current bug behavior?
Error.
## What is the expected correct behavior?
Pass.
## Relevant logs and/or screenshots
```../src/operators.ttcn:49.10-11: error: Type mismatch: a value of type `@operators.enum1' was expected instead of `@operators.enum2'```
## Possible fixes
## Titan version
8.1.0
## Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyari