abort if the factor will become to bigger
This commit is contained in:
parent
85fc4ae50a
commit
fa8ff6d5b6
@ -90,6 +90,13 @@ class TFactor
|
|||||||
for (unsigned i = 0; i < g_args.size(); i++) {
|
for (unsigned i = 0; i < g_args.size(); i++) {
|
||||||
int idx = indexOf (g_args[i]);
|
int idx = indexOf (g_args[i]);
|
||||||
if (idx == -1) {
|
if (idx == -1) {
|
||||||
|
Params::size_type newSize = params_.size() * g_ranges[i];
|
||||||
|
if (newSize > Util::maxUnsigned()) {
|
||||||
|
// factor will become to bigger, is not worth to continue
|
||||||
|
cerr << "error: an overflow occurred when performing expansion" ;
|
||||||
|
cerr << endl;
|
||||||
|
abort();
|
||||||
|
}
|
||||||
insertArgument (g_args[i], g_ranges[i]);
|
insertArgument (g_args[i], g_ranges[i]);
|
||||||
gvarpos.push_back (args_.size() - 1);
|
gvarpos.push_back (args_.size() - 1);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user