Rash promise

The rash promise is a common motif in medieval and folk literature, especially fairy tales. It was also termed a blind promise or rash boon. It is classified as Aarne-Thompson M223 and likely has an Oriental origin.
Examples.
The motif involves a character who makes a promise pertaining to love for another character. The first character promises to grant the other his/her love if an impossible wish is granted. Alternately, the first character could promise the second anything he/she asks for in exchange for escape from a life-or-death situation. 
A notable example of the first scenario is Geoffrey Chaucer's "The Franklin's Tale", itself partly based on Boccaccio's "The Filocolo"; Dorigen, a married woman whose husband is absent, promises another suitor that he may have her if she makes the rocks on the coast of Brittany disappear. 
An example of the second variation is found in Chaucer's "The Wife of Bath's Tale", where the main character, a young rapist knight threatened with execution if he cannot answer the question "What do women want?," promises an older woman (the proverbial "loathly lady") anything she desires if she can provide the answer (she desires to marry him).