primer3-org / primer3

Primer3 is a command line tool to select primers for polymerase chain reaction (PCR).
GNU General Public License v2.0
218 stars 62 forks source link

critical memory error with humrep_and_simple.txt as mispriming library #57

Closed jocelyne8 closed 2 years ago

jocelyne8 commented 2 years ago

This quite an odd one I don't know what to make of it.

If I try to design primers using the following primer3 input: primer3_input.target_56.txt

I get a reproducible critical memory error:

*** Error in `primer3_core': double free or corruption (!prev): 0x00005561456236d0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x81299)[0x2b87b0aec299]
primer3_core(+0x12a98)[0x556142d4aa98]
primer3_core(+0x12b21)[0x556142d4ab21]
primer3_core(+0x2ac4)[0x556142d3aac4]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x2b87b0a8d555]
...

If I remove the mispriming library, things run fine. If I remove all sequences beyond LTR4 (i.e. that's the last one), then it runs fine. If I include LTR5 (the following one), I get the memory error. If I remove only LTR5 (the one after LTR4), I get a memory error.

The memory error happens AFTER it spits out all the primer pairs.

I did a clean download of the file from https://github.com/primer3-org/primer3/blob/main/src/humrep_and_simple.txt

I am running the latest primer3:

USAGE: primer3_core [--format_output] [--default_version=1|--default_version=2] [--io_version=4] [--p3_settings_file=<file_path>] [--echo_settings_file] [--strict_tags] [--output=<file_path>] [--error=<file_path>] [input_file]
This is primer3 (libprimer3 release 2.5.0)

I still think I must be doing something odd, but at this point I'm a bit at a loss.

jocelyne8 commented 2 years ago

Addendum: I downgraded to primer3 2.4.0 and it went through.

untergasser commented 2 years ago

Hi,

thank you for letting us know. Just in time, I will prepare a release tomorrow. It should be fixed in the latest commit: https://github.com/primer3-org/primer3/commit/cc1a6e8e9b9861b9b3a8448a81ded4125d72225a

Hope it works now for you!

Best, Andreas

jocelyne8 commented 2 years ago

Hello, I did not at all expect such a fast turnaround on this! I am in total awe. Thank you so very much for fixing this so promptly; I really appreciate it. I built from source and can confirm I can get a completed run. I will wait for the release to update dependencies since it sounds imminent. Thank you again! Jocelyne