Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ecm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZIMMERMANN Paul
ecm
Commits
8c927a17
Commit
8c927a17
authored
9 months ago
by
ZIMMERMANN Paul
Browse files
Options
Downloads
Patches
Plain Diff
fixed
#21876
parent
b02836a6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#997304
passed
9 months ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
parametrizations.c
+7
-3
7 additions, 3 deletions
parametrizations.c
test.ecm
+3
-0
3 additions, 0 deletions
test.ecm
with
10 additions
and
3 deletions
parametrizations.c
+
7
−
3
View file @
8c927a17
...
...
@@ -425,11 +425,15 @@ int
get_curve_from_random_parameter
(
mpz_t
f
,
mpres_t
A
,
mpres_t
x
,
mpz_t
sigma
,
int
param
,
mpmod_t
modulus
,
gmp_randstate_t
rng
)
{
int
ret
;
int
ret
=
ECM_ERROR
;
/* initialize the random number generator if not already done */
init_randstate
(
rng
);
do
/* we perform only a fixed number of tries to find a suitable curve,
to avoid an infinite loop in corner cases (for example with -param 1,
there is no valid sigma for n=3, see
https://gitlab.inria.fr/zimmerma/ecm/-/issues/21876) */
for
(
int
i
=
0
;
ret
==
ECM_ERROR
&&
i
<
10
;
i
++
)
{
if
(
param
==
ECM_PARAM_SUYAMA
)
{
...
...
@@ -453,7 +457,7 @@ get_curve_from_random_parameter (mpz_t f, mpres_t A, mpres_t x, mpz_t sigma,
}
else
return
ECM_ERROR
;
}
while
(
ret
==
ECM_ERROR
);
}
return
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
test.ecm
+
3
−
0
View file @
8c927a17
...
...
@@ -534,6 +534,9 @@ checkcode $? 0
echo
18446744073709551557 |
$ECM
-param
1
-A
312656731337392125 11000
checkcode
$?
8
# non-regression test for https://gitlab.inria.fr/zimmerma/ecm/-/issues/21876
echo
3 |
$ECM
-param
1 1000 1000
;
checkcode
$?
1
# test -bsaves/-bloads
TEST
=
test.ecm.s
$$
echo
18446744073709551557 |
$ECM
-param
1
-A
1
-bsaves
$TEST
11000
...
...
This diff is collapsed.
Click to expand it.
ZIMMERMANN Paul
@zimmerma
mentioned in issue
#21876 (closed)
·
9 months ago
mentioned in issue
#21876 (closed)
mentioned in issue #21876
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment