Here are two quotes from The Perfection of Giving (Acariya Dhammapala),
When the Great Man (the Bodhisatta) gives an external object, he gives whatever is needed to whomever stands in need of it; and knowing by himself that someone is in need of something, he gives it even unasked, much more when asked. He gives sufficiently, not insufficiently, when there is something to be given. He does not give because he expects something in return. And when there is not enough to give sufficiently to all, he distributes evenly whatever can be shared. But he does not give things that issue in affliction for others, such as weapons, poisons, and intoxicants. Nor does he give amusements which are harmful and lead to negligence. And he does not give unsuitable food or drink to a person who is sick, even though he might ask for it, and he does not give what is suitable beyond the proper measure.
Herein, giving an internal gift, he gives only what leads to the welfare of the recipient, and nothing else. The Great Man does not knowingly give his own body, limbs, and organs to Mara or to the malevolent deities in Mara' s company, thinking: "Let this not lead to their harm." And likewise, he does not give to those possessed by Mara or his deities, or to madmen. But when asked for these things by others, he gives immediately, because of the rarity of such a request and the difficulty of making such a gift.
This teaching (if true) seems to contradict the story about the Buddha giving his body to a hungry tigress in a previous life, or not?
I might be wrong but I can imagine many explanations for why this doesn't contradict the "tigress" story (versions of which story exist here and here):
- The gift of his body doesn't harm the Bodhisattva
- Saving several tiger cubs might be more important than saving one human body (see e.g. the story for the pirates being killed; or the Dalai Lama's alleged suggestion that it might be better to kill one cow than several shrimp)
- Saving the tigress from killing her cubs (i.e. her sila) is more important than saving the body
- The Bodhisattva's gift of his body became a teaching story, so it's also a gift of Dharma
Perhaps we shouldn't "expect" that everyone will behave like (behave as well as) the Bodhisattva: just as not everyone chooses to "go forth into homelessness".
In particular I suspect that if most people did this (killed themselves) it would be an act violence. It was partly the Bodhisattva's insight or wisdom, or something like that, which allowed the Bodhisattva to view it as a (praiseworthy) act of generosity instead of as a (blameworthy) act of killing.
On the other hand, the tigress story and the pirates story are not part of the Pali canon.
Thanissaro Bhikkhu has his own version of the pirate story in this Dhamma talk:
A friend once told me about a question he had posed to a number of his
friends. The question was this: “Suppose that you’re dreaming, and in this dream
you’re in a boat with your mother and your child, and a lot of other people you
really feel you love a lot. A pirate comes along and demands one person’s life.
What do you do?” He said as he tells this problem to adults, they think about
their mothers and they think about their children, they think about sacrificing
themselves and also think, “Well, if I sacrifice myself the kid will suffer…” And
they can never solve the problem. But if you pose the question to kids they’ll say,
“Well, wake up. It’s just a dream, right?”