15-mol_grid_grid_crash.mdl 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /****************************************************************************
  2. * Regression test 15: Under certain circumstances, mol-grid-grid reactions
  3. * could lead to a crash. The wrong variable was being used to index into
  4. * the array of matching reactions in the mol-grid-grid case, causing mcell
  5. * to access outside the bounds of the array. This may not reliably fail,
  6. * and may depend on the compiler and architecture.
  7. *
  8. * Failure: crash
  9. * Success: run exits successfully
  10. *
  11. * Author: Jed Wing <[email protected]>
  12. * Date: 2009-04-12
  13. ****************************************************************************/
  14. TIME_STEP = 1e-6
  15. ITERATIONS = 1000
  16. DEFINE_MOLECULES {
  17. c { DIFFUSION_CONSTANT_3D = 1e-6 }
  18. a { DIFFUSION_CONSTANT_3D = 1e-6 }
  19. b { DIFFUSION_CONSTANT_2D = 1e-7 }
  20. }
  21. DEFINE_REACTIONS {
  22. a, + b' + b' -> c, + b' + b' [1e20]
  23. c -> a [1e20]
  24. }
  25. INSTANTIATE world OBJECT {
  26. box BOX {
  27. CORNERS = [-0.1, -0.1, -0.1], [0.1, 0.1, 0.1]
  28. }
  29. rs1 RELEASE_SITE {
  30. SHAPE = world.box
  31. MOLECULE = b'
  32. NUMBER_TO_RELEASE = 2000
  33. }
  34. rs2 RELEASE_SITE {
  35. SHAPE = world.box
  36. MOLECULE = a
  37. NUMBER_TO_RELEASE = 2000
  38. }
  39. }