I'm working on a humor novel right now, and was wondering: how far is too far when it comes to jokes, or putting characters in crazy situations? Is there a certain line that humor writers just shouldn't cross?

I mean, take Chris Rock as an example. He says the most terrible things about people (especially people of color). But he gets the most outrageous laughs. Is he right or wrong in doing that?

And, again: how far should we as writers go without something becoming unsalable or so distasteful that no one wants to read it?