File: vector.cxx

package info (click to toggle)
eztrace 2.0%2Brepack-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,132 kB
  • sloc: ansic: 23,501; perl: 910; sh: 857; cpp: 771; makefile: 696; fortran: 327; f90: 320; python: 57
file content (24 lines) | stat: -rw-r--r-- 647 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* -*- c-file-style: "GNU" -*- */
/*
 * Copyright (C) CNRS, INRIA, Université Bordeaux 1, Télécom SudParis
 * See COPYING in top-level directory.
 */

#include <vector>
#include <iostream>

// This program was used to demonstrate a bug in EZTrace in October 2011
// when compiled with -O3, running the program with eztrace causes a SIGSEGV
// this was due to the memory module:
// the implementation of malloc returned a buffer that is not 'aligned'

// This bug was fixed by commit #701

int main(int argc, char **argv) {
  int rank = 0;
  std::cout << "MyRank : " << rank << std::endl;
  std::vector<double> a;
  a.resize(10);

  return 0;
}