Skip to content

Commit

Permalink
fix vector exception
Browse files Browse the repository at this point in the history
  • Loading branch information
ckrause committed Dec 6, 2022
1 parent 800e8ea commit c7a2c90
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@ To install or update LODA, please follow the [installation instructions](https:/

## [Unreleased]

## v22.12.6

### Bugfixes

* Fix vector exception

### Enhancements

* Increase maximum number of cycles to 30 million

## v22.12.2

### Enhancements

* Increase default OEIS update interval
Expand Down
2 changes: 1 addition & 1 deletion miners.default.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{
"name": "update",
"overwrite": "auto",
"enabled": false,
"enabled": true,
"backoff": true,
"generators": [
"v2",
Expand Down
2 changes: 1 addition & 1 deletion src/include/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Settings {
public:
static constexpr size_t DEFAULT_NUM_TERMS = 10;
static constexpr int64_t DEFAULT_MAX_MEMORY = 1000;
static constexpr int64_t DEFAULT_MAX_CYCLES = 25000000;
static constexpr int64_t DEFAULT_MAX_CYCLES = 30000000;

size_t num_terms;
int64_t max_memory;
Expand Down
7 changes: 5 additions & 2 deletions src/stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,15 @@ int64_t Stats::getTransitiveLength(size_t id) const {
visited_programs.clear();
if (printed_recursion_warning.find(id) == printed_recursion_warning.end()) {
printed_recursion_warning.insert(id);
Log::get().warn("Recursion detected in stats for " +
OeisSequence(id).getProgramPath());
Log::get().warn("Recursion detected: " + OeisSequence(id).id_str());
}
return -1;
}
visited_programs.insert(id);
if (id >= program_lengths.size()) {
Log::get().warn("Invalid reference: " + OeisSequence(id).id_str());
return -1;
}
int64_t length = program_lengths.at(id);
auto range = call_graph.equal_range(id);
for (auto &it = range.first; it != range.second; it++) {
Expand Down

0 comments on commit c7a2c90

Please sign in to comment.