Hardware serial with 2 arduino's

Hi PaulS, thanks for your reply, but I don't think that it is fundamentally changing the situation, it just moves the place where more iteration is done to the loop() method.

I have made a cleaner test case (including your suggestion), the code:

Arduino 1 (code in Arduino language)

void setup() {
 Serial.begin(57600); 
}

void loop() {
  Serial.println("hi");
  delay(1000);
}

Arduino 2 (code in c++)

#include <HardwareSerial.h>
#include <wiring.h>

extern "C" void __cxa_pure_virtual() {
      while (1)
            ;
}

void setup() {
      Serial.begin(57600);
      Serial1.begin(57600);
}

void loop() {
      while (Serial1.available() > 0) {
            int val = Serial1.read();
            Serial.write(val);
      }
}

int main(void) {
      init();
      setup();
      for (;;) {
            loop();
      }
}

The output:

hiCáhi
hi
hZCáhi
áhi
hi
hZCáhiCáhi
áhi
hi
hi
hi
hZCáhZCáhiCáhiCáhi
áhi
áhi
hi
hi
áhi

It looks like sometimes the 'i' is missing, sometimes the '\r' or '\n' is missing, I really don't understand what's going on.